aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-03-19 10:56:34 -0600
committerTom Tromey <tromey@adacore.com>2024-04-02 10:58:37 -0600
commit99364b187fd75202a40bc375c278417f0237194e (patch)
treeb8a6adf830bb87e90a1584af21d0795feb10382a /gdb
parent788050bf18c05f9070cd4240c6ae90c6dee0f030 (diff)
downloadgdb-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.py2
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