From 77830ecb006616b1d46fc3826ee7248e3714d9fb Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 26 May 2021 13:06:47 +0200 Subject: [PATCH] separated catch error of filling workdir template and creating workdir on disk --- openpype/lib/applications.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index d7674d64ad..d82b7cd847 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -1190,17 +1190,23 @@ def prepare_context_environments(data): try: workdir = get_workdir_with_workdir_data(workdir_data, anatomy) - if not os.path.exists(workdir): - log.debug( - "Creating workdir folder: \"{}\"".format(workdir) - ) - os.makedirs(workdir) except Exception as exc: raise ApplicationLaunchFailed( "Error in anatomy.format: {}".format(str(exc)) ) + if not os.path.exists(workdir): + log.debug( + "Creating workdir folder: \"{}\"".format(workdir) + ) + try: + os.makedirs(workdir) + except Exception as exc: + raise ApplicationLaunchFailed( + "Couldn't create workdir because: {}".format(str(exc)) + ) + context_env = { "AVALON_PROJECT": project_doc["name"], "AVALON_ASSET": asset_doc["name"],