[Bugfix]: Take into account onset time might be None.

This commit is contained in:
Ludger Küperkoch 2020-07-29 15:10:22 +02:00
parent 82e2c325ae
commit f49b9054b0

View File

@ -547,9 +547,10 @@ def writephases(arrivals, fformat, filename, parameter=None, eventinfo=None):
ss_ms,
pweight))
# S onsets
if arrivals[key].has_key('S') and arrivals[key]['S']:
if arrivals[key].has_key('S') and arrivals[key]['S']['mpp'] is not None:
fm = '?'
onset = arrivals[key]['S']['mpp']
print(onset)
year = onset.year
month = onset.month
day = onset.day