[fix] do not try to proceed if no picks are available

This commit is contained in:
Sebastian Wehling-Benatelli 2016-03-02 11:07:32 +01:00
parent 5e26519d66
commit 8c7a2af2db

View File

@ -432,11 +432,13 @@ class Data(object):
if firstonset is None or firstonset > onset: if firstonset is None or firstonset > onset:
firstonset = onset firstonset = onset
if 'smi:local' in self.getID(): if 'smi:local' in self.getID() and firstonset:
fonset_str = firstonset.strftime('%Y_%m_%d_%H_%M_%S') fonset_str = firstonset.strftime('%Y_%m_%d_%H_%M_%S')
ID = ResourceIdentifier('event/' + fonset_str) ID = ResourceIdentifier('event/' + fonset_str)
ID.convertIDToQuakeMLURI(authority_id=authority_id) ID.convertIDToQuakeMLURI(authority_id=authority_id)
self.getEvtData().resource_id = ID self.getEvtData().resource_id = ID
else:
print('No picks to apply!')
def applyArrivals(arrivals): def applyArrivals(arrivals):
""" """