[Bugfix] savepath might be 'None', not None.

This commit is contained in:
Ludger Küperkoch 2017-08-15 10:17:08 +02:00
parent a9d06790d2
commit 4a2d118191

View File

@ -405,13 +405,13 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
# write phase files for various location # write phase files for various location
# and fault mechanism calculation routines # and fault mechanism calculation routines
# ObsPy event object # ObsPy event object
data.applyEVTData(picks)
if evt is not None: if evt is not None:
event_id = eventpath.split('/')[-1] event_id = eventpath.split('/')[-1]
evt.resource_id = ResourceIdentifier('smi:local/' + event_id) evt.resource_id = ResourceIdentifier('smi:local/' + event_id)
data.applyEVTData(evt, 'event') data.applyEVTData(evt, 'event')
data.applyEVTData(picks)
if savexml: if savexml:
if not savepath: if savepath == 'None':
savepath = eventpath savepath = eventpath
fnqml = '%s/PyLoT_%s' % (savepath, evID) fnqml = '%s/PyLoT_%s' % (savepath, evID)
data.exportEvent(fnqml, fnext='.xml', fcheck=['auto', 'magnitude', 'origin']) data.exportEvent(fnqml, fnext='.xml', fcheck=['auto', 'magnitude', 'origin'])