From 55810b992659798a2a961e1f0e09d5f71d0e081f Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Wed, 21 Oct 2020 15:24:35 +0200 Subject: [PATCH] correct for deprecated condition usage --- pylot/core/util/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pylot/core/util/utils.py b/pylot/core/util/utils.py index 038a4ce8..a496e0db 100644 --- a/pylot/core/util/utils.py +++ b/pylot/core/util/utils.py @@ -174,7 +174,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): @@ -795,7 +795,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))