Generally using except: is a mistake since it catches everything
including SystemExit / KeyboardInterrupt / etc.... When we really
do want such a catch we should explicitly use except BaseException:,
otherwise we normally want except Exception: or even better, name
the specific exception that might occur.
Details
Details
- Reviewers
deadalnix - Group Reviewers
Restricted Project - Commits
- rSTAGING949b64f4c5e4: [python linting] enforce E722: do not use bare except
rABC949b64f4c5e4: [python linting] enforce E722: do not use bare except
arc lint --everything ninja check-all
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
test/functional/rpc_preciousblock.py | ||
---|---|---|
18 ↗ | (On Diff #16135) | I'm still not quite sure why this loop is made like this, or what exactly it is catching. |
test/functional/test_framework/test_framework.py | ||
323 ↗ | (On Diff #16135) | Probably the only place we want to have keyboard interrupts being caught... I think. |
.arclint | ||
---|---|---|
29 ↗ | (On Diff #16135) | The remaining four are: E501 Line too long (82 > 79 characters) E704 Multiple statements on one line (def) W503 Line break occurred before a binary operator W504 Line break occurred after a binary operator They have a bunch of violations and in fact the latter three are not even enabled by default in flake8. This is about as far as we can get with the low hanging fruit. |