Flake8 checking: disable E722: do not use bare except (#812)
Travis suddenly fails, because flake8 has a new detection rule: Using except to catch all exceptions triggers E722. However, we only use it once and we really want to catch all exceptions, as it wraps the whole program and shows a nice error message, with the full trace in the log.
This commit is contained in:
parent
6769e4635e
commit
eaaff660ea
|
@ -47,11 +47,12 @@ done
|
|||
# E501: max line length
|
||||
# F401: imported, but not used, does not make sense in __init__ files
|
||||
# E402: module import not on top of file, not possible for testcases
|
||||
# E722: do not use bare except
|
||||
cd "$DIR"/..
|
||||
echo "Test with flake8: *.py"
|
||||
echo "NOTE: Run 'autopep8 -ria $PWD' to fix code style issues"
|
||||
py_files="$(find . -name '*.py')"
|
||||
_ignores="E501,E402"
|
||||
_ignores="E501,E402,E722"
|
||||
# shellcheck disable=SC2086
|
||||
flake8 --exclude=__init__.py --ignore "$_ignores" $py_files
|
||||
# shellcheck disable=SC2086
|
||||
|
|
Loading…
Reference in New Issue