From eea84c9e7a1b0a055dbd8689b91c0dd31b5c0e5b Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 26 Jul 2019 11:05:37 +0200 Subject: [PATCH] (hotfix) missing application config toml file is more specifically logged --- pype/ftrack/lib/avalon_sync.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pype/ftrack/lib/avalon_sync.py b/pype/ftrack/lib/avalon_sync.py index 4eaf28eae4..94de0172af 100644 --- a/pype/ftrack/lib/avalon_sync.py +++ b/pype/ftrack/lib/avalon_sync.py @@ -507,11 +507,17 @@ def get_project_apps(entity): apps = [] for app in entity['custom_attributes']['applications']: try: - app_config = {} - app_config['name'] = app - app_config['label'] = toml.load(avalon.lib.which_app(app))['label'] + toml_path = avalon.lib.which_app(app) + if not toml_path: + log.warning(( + 'Missing config file for application "{}"' + ).format(app)) + continue - apps.append(app_config) + apps.append({ + 'name': app, + 'label': toml.load(toml_path)['label'] + }) except Exception as e: log.warning('Error with application {0} - {1}'.format(app, e))