Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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 :
event = Event(impl, number, clsname, context)
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?