From 1e4b1d691a8158631392a37df0c67d7f24170adf Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Thu, 15 Sep 2016 12:14:43 +0200 Subject: [PATCH] [bugfix] using get method and account for not existing autopylot input file --- pylot/core/util/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylot/core/util/utils.py b/pylot/core/util/utils.py index f09efa16..b2ba044d 100644 --- a/pylot/core/util/utils.py +++ b/pylot/core/util/utils.py @@ -473,7 +473,8 @@ def which(program): if 'binPath' in key: os.environ['PATH'] += ':{0}'.format(settings.value(key)) bpath = os.path.join(os.path.expanduser('~'), '.pylot', 'autoPyLoT.in') - os.environ['PATH'] += AutoPickParameter(bpath)['nllocbin'] + if os.path.exists(bpath): + os.environ['PATH'] += AutoPickParameter(bpath).get('nllocbin') except ImportError as e: print(e.message)