use normalized 'TemplateResult' output in 'get_workdir_with_workdir_data'

This commit is contained in:
Jakub Trllo 2022-07-20 10:12:56 +02:00
parent 5963066a7e
commit ab34b6f1cf
3 changed files with 5 additions and 4 deletions

View file

@ -325,7 +325,6 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
asset_entity = instance.data["assetEntity"]
anatomy = instance.context.data["anatomy"]
workdir = get_workdir(
return get_workdir(
project_doc, asset_entity, task_data["name"], "flame", anatomy
)
return os.path.normpath(workdir)

View file

@ -1638,7 +1638,6 @@ def prepare_context_environments(data, env_group=None):
"Error in anatomy.format: {}".format(str(exc))
)
workdir = os.path.normpath(workdir)
if not os.path.exists(workdir):
log.debug(
"Creating workdir folder: \"{}\"".format(workdir)

View file

@ -582,7 +582,10 @@ def get_workdir_with_workdir_data(
anatomy_filled = anatomy.format(workdir_data)
# Output is TemplateResult object which contain useful data
return anatomy_filled[template_key]["folder"]
output = anatomy_filled[template_key]["folder"]
if output:
return output.normalized()
return output
def get_workdir(