fixed exception handling in AudioSignal.make_effect
MODIFY
nussl/core/audio_signal.py
nussl/core/audio_signal.py
@@ -1712,7 +1712,7 @@ class AudioSignal(object):
try:
effect_hook = getattr(self, effect, None)
effect_hook(**params)
- except:
+ except Exception:
raise AudioSignalException(f"Effect {effect} not found with parameters {params}")
return self

MODIFY
tests/core/test_effects.py
tests/core/test_effects.py
import numpy as np
import nussl.core.effects as effects
+from nussl.core.audio_signal import AudioSignalException
import os
import os.path as path
import pytest
@@ -407,7 +408,7 @@ def test_make_effect(mix_and_sources, check_against_regression_data):
# This should result in the same signal in test_hooks
fx_regression(augmented_signal.audio_data, reg_path, check_against_regression_data)
- with pytest.raises(ValueError):
+ with pytest.raises(AudioSignalException):
signal.make_effect("fail")
def test_filter_function_pass():

fixed exception handling in AudioSignal.make_effect