[ https://issues.apache.org/jira/browse/PROTON-2563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Stitcher reassigned PROTON-2563: --------------------------------------- Assignee: Andrew Stitcher > local variable 'context' referenced before assignment > ----------------------------------------------------- > > Key: PROTON-2563 > URL: https://issues.apache.org/jira/browse/PROTON-2563 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding > Reporter: Daniel Mewes > Assignee: Andrew Stitcher > Priority: Major > > We're intermittently getting the following Python exception from qpid-proton: > UnboundLocalError: local variable 'context' referenced before assignment > The exception is raised in this line > [https://github.com/apache/qpid-proton/blob/0.37.0/python/proton/_events.py#L419] > : > {code:java} > event = Event(impl, number, clsname, context) {code} > Looking at that code, there appears to be a clear bug in that the `context` > local variable is only set in the `if cls` branch, but not in the `else` > branch above. > Presumably, context should at least be set to `None` in the else branch to > avoid this exception? -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org