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:
parent
788050bf18
commit
99364b187f
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ try:
|
|||
except:
|
||||
return content
|
||||
|
||||
except:
|
||||
except ImportError:
|
||||
|
||||
def colorize(filename, contents):
|
||||
return None
|
||||
|
|
Loading…
Add table
Reference in a new issue