bugfix/environment_crashing_on_floats

This commit is contained in:
Milan Kolar 2019-11-14 11:21:55 +01:00
parent f263eabe82
commit b567af166d

View file

@ -271,20 +271,21 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
for key in environment:
clean_path = ""
self.log.debug("key: {}".format(key))
to_process = environment[key]
self.log.debug("value: {}".format(environment[key]))
to_process = str(environment[key])
if key == "PYPE_STUDIO_CORE_MOUNT":
clean_path = environment[key]
elif "://" in environment[key]:
clean_path = environment[key]
elif os.pathsep not in to_process:
clean_path = to_process
elif "://" in to_process:
clean_path = to_process
elif os.pathsep not in str(to_process):
try:
path = environment[key]
path = to_process
path.decode('UTF-8', 'strict')
clean_path = os.path.normpath(path)
except UnicodeDecodeError:
print('path contains non UTF characters')
else:
for path in environment[key].split(os.pathsep):
for path in to_process.split(os.pathsep):
try:
path.decode('UTF-8', 'strict')
clean_path += os.path.normpath(path) + os.pathsep