Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood

This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.

This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`.  If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.

Of course, being specific is often better than a catch all.

MozReview-Commit-ID: FKx80MLO4RN
This commit is contained in:
Andrew Halberstadt
2018-01-31 14:32:08 -05:00
parent 6f5a25c314
commit 3353b79e9c
63 changed files with 117 additions and 117 deletions

View File

@@ -4,7 +4,7 @@
try:
from setuptools import setup
except:
except ImportError:
from distutils.core import setup