Skip to content

Fix-up of #10307: Don't use bare except#11338

Merged
michaelDCurran merged 1 commit into
nvaccess:masterfrom
accessolutions:pr10307-E722
Jul 6, 2020
Merged

Fix-up of #10307: Don't use bare except#11338
michaelDCurran merged 1 commit into
nvaccess:masterfrom
accessolutions:pr10307-E722

Conversation

@JulienCochuyt

Copy link
Copy Markdown
Contributor

Link to issue number:

Fix-up of #10307

Summary of the issue:

While having a look at helping to resolve merge conflicts for #7784, I've had to re-read this old code of mine, recently merged into master.
I've back then used twice a bare except neutralized with noqa: E722.
If @LeonarddeR had a chance to review this code, he would have wisely pointed out this is bad practice and requested for a change.
I know there are 271 other occurrences of bare except in the source code of NVDA vs. only 34 of except Exception, but please allow me to help move in the good direction rather than perpetuate errors - especially as the noqa constructs might lead new readers to erroneously assume this construct has recently been validated.

Description of how this pull request fixes the issue:

Remove two occurrences, introduced by myself, of:

except:  # noqa: E722

by the correct form:

except Exception:

Testing performed:

Known issues with pull request:

Change log entry:

N/A

@michaelDCurran michaelDCurran merged commit 0358e7f into nvaccess:master Jul 6, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.3 milestone Jul 6, 2020
@JulienCochuyt JulienCochuyt deleted the pr10307-E722 branch July 8, 2020 08:05
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.

3 participants