correct for deprecated condition usage

This commit is contained in:
Sebastian Wehling-Benatelli 2020-10-21 15:24:35 +02:00
parent 79fac36cf5
commit 0bdfd96659

View File

@ -227,7 +227,7 @@ def findComboBoxIndex(combo_box, val):
:type val: basestring
:return: index value of item with name val or 0
"""
return combo_box.findText(val) if combo_box.findText(val) is not -1 else 0
return combo_box.findText(val) if combo_box.findText(val) != -1 else 0
def find_in_list(list, str):
@ -1013,7 +1013,7 @@ def scaleWFData(data, factor=None, components='all'):
:return: scaled waveform data
:rtype: `~obspy.core.stream.Stream` object
"""
if components is not 'all':
if components != 'all':
for comp in components:
if factor is None:
max_val = np.max(np.abs(data.select(component=comp)[0].data))