[Bugfix] Wrong syntax for multiple if statements.
This commit is contained in:
parent
6f70b2c0e2
commit
7d77cb0b2f
@ -362,22 +362,15 @@ def picks_from_picksdict(picks, creation_info=None):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
polarity = picks[station][label]['fm']
|
polarity = picks[station][label]['fm']
|
||||||
if polarity == 'U' or '+':
|
if polarity == 'U' or polarity == '+':
|
||||||
pick.polarity = 'positive'
|
pick.polarity = 'positive'
|
||||||
elif polarity == 'D' or '-':
|
elif polarity == 'D' or polarity == '-':
|
||||||
pick.polarity = 'negative'
|
pick.polarity = 'negative'
|
||||||
else:
|
else:
|
||||||
pick.polarity = 'undecidable'
|
pick.polarity = 'undecidable'
|
||||||
except:
|
except:
|
||||||
pick.polarity = 'undecidable'
|
pick.polarity = 'undecidable'
|
||||||
print("No polarity information available!")
|
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)
|
picks_list.append(pick)
|
||||||
return picks_list
|
return picks_list
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user