Skip to content

Commit 2f7ba95

Browse files
milapgjones
authored andcommitted
Shorten traceback of protocol errors.
KeyError with "During handling of the above exception, another exception occurred:" is unnecessary in an exception chain.
1 parent 5d958b5 commit 2f7ba95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

h11/_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def _fire_event_triggered_transitions(self, role, event_type):
252252
"can't handle event type {} when role={} and state={}".format(
253253
event_type.__name__, role, self.states[role]
254254
)
255-
)
255+
) from None
256256
self.states[role] = new_state
257257

258258
def _fire_state_triggered_transitions(self):

0 commit comments

Comments
 (0)