Skip to content

ansistrm: narrow bare except to Exception#196

Open
c-tonneslan wants to merge 1 commit into
openstates:mainfrom
c-tonneslan:chore/narrow-bare-except-ansistrm
Open

ansistrm: narrow bare except to Exception#196
c-tonneslan wants to merge 1 commit into
openstates:mainfrom
c-tonneslan:chore/narrow-bare-except-ansistrm

Conversation

@c-tonneslan

Copy link
Copy Markdown

flake8 E722. The handler already re-raises KeyboardInterrupt and SystemExit above the bare except:, so widening to all base exceptions doesn't actually buy anything - swap for except Exception to make the intent explicit and silence the lint.

flake8's E722 catches this. KeyboardInterrupt and SystemExit are
already re-raised above, so the bare except was only there for the
remaining Exception subclasses anyway.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant