diff --git a/scripts/acoustics.py b/scripts/acoustics.py index c0477e288e1bdb0e82c3dedc29f0432152b958d1..c72f03d96b5798634519f6ce2db8baa87b55d9f5 100644 --- a/scripts/acoustics.py +++ b/scripts/acoustics.py @@ -160,8 +160,7 @@ while check: N_Pulses_Indicator_DU.append(-1.5) - except: - stop = [] + except (TypeError, ValueError): # TypeError if no data found for a certain piezo, ValueError if there are zero data for a certain piezo N_Pulses_Indicator_DU.append(-1.5) N_Pulses_Indicator.append(N_Pulses_Indicator_DU)