[bugfix] using get method and account for not existing autopylot input file

This commit is contained in:
Sebastian Wehling-Benatelli 2016-09-15 12:14:43 +02:00
parent 4233af55c6
commit 1e4b1d691a

View File

@ -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)