HomePhabricator

[python linting] enforce E722: do not use bare except

Description

[python linting] enforce E722: do not use bare except

Summary:
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.

Depends on D5204 D5206

Test Plan:

arc lint --everything
ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5208

Details

Provenance
Mark Lundeberg <markblundeberg@users.noreply.github.com>Authored on Feb 7 2020, 16:46
markblundebergPushed on Feb 7 2020, 18:40
Reviewer
Restricted Project
Differential Revision
D5208: [python linting] enforce E722: do not use bare except
Parents
rABCc7af8f0ab549: Merge #13823: qa: quote path in authproxy for external multiwallets
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <markblundeberg@users.noreply.github.com> committed rABC949b64f4c5e4: [python linting] enforce E722: do not use bare except (authored by Mark Lundeberg <markblundeberg@users.noreply.github.com>).Feb 7 2020, 18:40