Skip to content

pyparser does not correctly handle exception handlers #227

Description

@sqlalchemy-bot

Migrated issue, originally created by Dolda2000 (@Dolda2000)

The FindIdentifiers code in pyparser crashes on an exception handler that uses an expression other than a simple name for the exception type.

The fix is simple. Line 105 in pyparser.py is currently:

self.listener.undeclared_identifiers.add(node.type.id)

Simply replace with this:

self.visit(node.type)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions