mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +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.
|
||||
env = kwargs.get("env") or os.environ
|
||||
# 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.
|
||||
logger = kwargs.pop("logger", log)
|
||||
|
|
|
|||
|
|
@ -10,20 +10,8 @@ class RepairUnicodeStrings(pyblish.api.Collector):
|
|||
|
||||
order = pyblish.api.CollectorOrder
|
||||
label = 'Unicode Strings'
|
||||
actions = [pype.api.RepairContextAction]
|
||||
|
||||
def process(self, instance):
|
||||
# invalid = self.get_invalid(instance)
|
||||
# if invalid:
|
||||
def process(self, context):
|
||||
for key, value in os.environ.items():
|
||||
self.log.info(type(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
|
||||
os.environ[str(key)] = str(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue