[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, ss_ms,
pweight)) pweight))
# S onsets # 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 = '?' fm = '?'
onset = arrivals[key]['S']['mpp'] onset = arrivals[key]['S']['mpp']
print(onset)
year = onset.year year = onset.year
month = onset.month month = onset.month
day = onset.day day = onset.day