diff options
author | Tom Tromey <tromey@adacore.com> | 2024-03-19 10:56:34 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-04-02 10:58:37 -0600 |
commit | 99364b187fd75202a40bc375c278417f0237194e (patch) | |
tree | b8a6adf830bb87e90a1584af21d0795feb10382a /gdb | |
parent | 788050bf18c05f9070cd4240c6ae90c6dee0f030 (diff) | |
download | gdb-99364b187fd75202a40bc375c278417f0237194e.zip gdb-99364b187fd75202a40bc375c278417f0237194e.tar.gz gdb-99364b187fd75202a40bc375c278417f0237194e.tar.bz2 |
Specify ImportError in styling.py
styling.py has a long try/except surrounding most of the body. flake8
warns about the final bare "except". However, this except is really
only there to catch the situation where the host doesn't have Pygments
installed. This patch changes this to only catch ImportError.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/python/lib/gdb/styling.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/lib/gdb/styling.py b/gdb/python/lib/gdb/styling.py index 9608b5e..704c992 100644 --- a/gdb/python/lib/gdb/styling.py +++ b/gdb/python/lib/gdb/styling.py @@ -92,7 +92,7 @@ try: except: return content -except: +except ImportError: def colorize(filename, contents): return None |