mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
ensure keys are converted to string as well
This commit is contained in:
parent
ba2d1c7edd
commit
55df47c8f3
2 changed files with 4 additions and 16 deletions
|
|
@ -94,7 +94,7 @@ def run_subprocess(*args, **kwargs):
|
||||||
# not passed.
|
# not passed.
|
||||||
env = kwargs.get("env") or os.environ
|
env = kwargs.get("env") or os.environ
|
||||||
# Make sure environment contains only strings
|
# Make sure environment contains only strings
|
||||||
filtered_env = {k: str(v) for k, v in env.items()}
|
filtered_env = {str(k): str(v) for k, v in env.items()}
|
||||||
|
|
||||||
# Use lib's logger if was not passed with kwargs.
|
# Use lib's logger if was not passed with kwargs.
|
||||||
logger = kwargs.pop("logger", log)
|
logger = kwargs.pop("logger", log)
|
||||||
|
|
|
||||||
|
|
@ -10,20 +10,8 @@ class RepairUnicodeStrings(pyblish.api.Collector):
|
||||||
|
|
||||||
order = pyblish.api.CollectorOrder
|
order = pyblish.api.CollectorOrder
|
||||||
label = 'Unicode Strings'
|
label = 'Unicode Strings'
|
||||||
|
actions = [pype.api.RepairContextAction]
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, context):
|
||||||
# invalid = self.get_invalid(instance)
|
|
||||||
# if invalid:
|
|
||||||
for key, value in os.environ.items():
|
for key, value in os.environ.items():
|
||||||
self.log.info(type(value))
|
os.environ[str(key)] = str(value)
|
||||||
if type(value) is type(u't'):
|
|
||||||
os.environ[key] = str(value)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def get_invalid(cls, instance):
|
|
||||||
invalid = []
|
|
||||||
for key, value in os.environ.items():
|
|
||||||
if type(value) is type(u't'):
|
|
||||||
invalid.append((key, value))
|
|
||||||
|
|
||||||
return invalid
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue