mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
bugfix/environment_crashing_on_floats
This commit is contained in:
parent
f263eabe82
commit
b567af166d
1 changed files with 8 additions and 7 deletions
|
|
@ -271,20 +271,21 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
|
||||||
for key in environment:
|
for key in environment:
|
||||||
clean_path = ""
|
clean_path = ""
|
||||||
self.log.debug("key: {}".format(key))
|
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":
|
if key == "PYPE_STUDIO_CORE_MOUNT":
|
||||||
clean_path = environment[key]
|
clean_path = to_process
|
||||||
elif "://" in environment[key]:
|
elif "://" in to_process:
|
||||||
clean_path = environment[key]
|
clean_path = to_process
|
||||||
elif os.pathsep not in to_process:
|
elif os.pathsep not in str(to_process):
|
||||||
try:
|
try:
|
||||||
path = environment[key]
|
path = to_process
|
||||||
path.decode('UTF-8', 'strict')
|
path.decode('UTF-8', 'strict')
|
||||||
clean_path = os.path.normpath(path)
|
clean_path = os.path.normpath(path)
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
print('path contains non UTF characters')
|
print('path contains non UTF characters')
|
||||||
else:
|
else:
|
||||||
for path in environment[key].split(os.pathsep):
|
for path in to_process.split(os.pathsep):
|
||||||
try:
|
try:
|
||||||
path.decode('UTF-8', 'strict')
|
path.decode('UTF-8', 'strict')
|
||||||
clean_path += os.path.normpath(path) + os.pathsep
|
clean_path += os.path.normpath(path) + os.pathsep
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue