[Bugfix] Wrong syntax for multiple if statements.

This commit is contained in:
Ludger Küperkoch 2020-09-30 10:11:10 +02:00
parent 6f70b2c0e2
commit 7d77cb0b2f

View File

@ -362,22 +362,15 @@ def picks_from_picksdict(picks, creation_info=None):
try:
polarity = picks[station][label]['fm']
if polarity == 'U' or '+':
if polarity == 'U' or polarity == '+':
pick.polarity = 'positive'
elif polarity == 'D' or '-':
elif polarity == 'D' or polarity == '-':
pick.polarity = 'negative'
else:
pick.polarity = 'undecidable'
except:
pick.polarity = 'undecidable'
print("No polarity information available!")
#except KeyError as e:
# if 'fm' in str(e): # no polarity information found for this phase
#if 'polarity' in str(e): # no polarity information found for this phase
# print("No polarity information available!")
# pass
# else:
# raise e
picks_list.append(pick)
return picks_list