Skip to content

Commit f19b57c

Browse files
committed
Use except Exception in place of bare except
1 parent cff05d9 commit f19b57c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/matplotlib/tests/test_backend_qt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_sigint(target, kwargs):
128128
try:
129129
proc.wait_for('DRAW')
130130
stdout, _ = proc.communicate(timeout=_test_timeout)
131-
except: # noqa: E722
131+
except Exception:
132132
proc.kill()
133133
stdout, _ = proc.communicate()
134134
raise
@@ -182,7 +182,7 @@ def test_other_signal_before_sigint(target, kwargs):
182182
proc.wait_for('SIGUSR1')
183183
os.kill(proc.pid, signal.SIGINT)
184184
stdout, _ = proc.communicate(timeout=_test_timeout)
185-
except: # noqa: E722
185+
except Exception:
186186
proc.kill()
187187
stdout, _ = proc.communicate()
188188
raise

lib/matplotlib/tests/test_font_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def test_get_font_names():
317317
font = ft2font.FT2Font(path)
318318
prop = ttfFontProperty(font)
319319
ttf_fonts.append(prop.name)
320-
except: # noqa: E722
320+
except Exception:
321321
pass
322322
available_fonts = sorted(list(set(ttf_fonts)))
323323
mpl_font_names = sorted(fontManager.get_font_names())

0 commit comments

Comments
 (0)