[bugfix] empty picks dictionary leading to KeyError

This commit is contained in:
Marcel Paffrath 2018-07-31 09:24:43 +02:00
parent db9a1371b1
commit cc9ae9c146

View File

@ -506,6 +506,8 @@ class Data(object):
# check for automatic picks
print("Writing phases to ObsPy-quakeml file")
for key in picks:
if not picks[key].get('P'):
continue
if picks[key]['P']['picker'] == 'auto':
print("Existing auto-picks will be overwritten in pick-dictionary!")
picks = picks_from_picksdict(picks)