Skip to content

Fix bare except clauses in oauth2/__init__.py#250

Open
koteshyelamati wants to merge 1 commit into
joestump:masterfrom
koteshyelamati:master
Open

Fix bare except clauses in oauth2/__init__.py#250
koteshyelamati wants to merge 1 commit into
joestump:masterfrom
koteshyelamati:master

Conversation

@koteshyelamati

Copy link
Copy Markdown

Replace bare except: clauses with except Exception: in oauth2/__init__.py.

Bare except: catches BaseException including SystemExit, KeyboardInterrupt, and GeneratorExit, which is almost never intentional.

Changes:

  • Line 539: except:except Exception: (OAuth header parsing)
  • Line 736: except:except Exception: (oauth_version parameter lookup)

Refine exception handling to specify Exception type.
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