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>
This commit is contained in:
Tom Tromey 2024-03-19 10:56:34 -06:00
parent 788050bf18
commit 99364b187f

View file

@ -92,7 +92,7 @@ try:
except:
return content
except:
except ImportError:
def colorize(filename, contents):
return None