pr comments

This commit is contained in:
Jakub Jezek 2023-02-01 16:06:01 +01:00
parent e10859d322
commit b2ed65c17a
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -649,12 +649,21 @@ def get_instance_staging_dir(instance):
custom_temp_dir = None
if openpype_temp_dir:
if "{" in openpype_temp_dir:
# path is anatomy template
custom_temp_dir = _format_staging_dir(
instance, openpype_temp_dir
)
elif os.path.exists(openpype_temp_dir):
else:
# path is absolute
custom_temp_dir = openpype_temp_dir
if not os.path.exists(custom_temp_dir):
try:
# create it if it doesnt exists
os.makedirs(custom_temp_dir)
except IOError as error:
raise IOError("Path couldn't be created: {}".format(error))
if custom_temp_dir:
staging_dir = os.path.normpath(
tempfile.mkdtemp(