diff --git a/doc/_ext/aafig.py b/doc/_ext/aafig.py
index <HASH>..<HASH> 100644
--- a/doc/_ext/aafig.py
+++ b/doc/_ext/aafig.py
@@ -183,7 +183,7 @@ def render_aafigure(app, text, options):
                     try:
                         f = open(metadata_fname, 'r')
                         extra = f.read()
-                    except:
+                    except Exception:
                         raise AafigError()
                 finally:
                     if f is not None:
flake8: Fix bare except in try/catch