From 9af4601fec369c19f2dd96f5aac2f53bf1b932a5 Mon Sep 17 00:00:00 2001 From: Ragy Ibrahim Date: Tue, 24 May 2022 17:19:26 +1000 Subject: [PATCH] Do not use bare except Can not use bare except, using import error as the exception type --- code/thinkdsp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/thinkdsp.py b/code/thinkdsp.py index 158f6430..55d7b9cd 100644 --- a/code/thinkdsp.py +++ b/code/thinkdsp.py @@ -23,7 +23,7 @@ try: from IPython.display import Audio -except: +except ImportError: warnings.warn( "Can't import Audio from IPython.display; " "Wave.make_audio() will not work." )