Skip to content

Commit

Permalink
Prevent unintended KeyError when emitting an unregistered event sch…
Browse files Browse the repository at this point in the history
…ema (#101)
  • Loading branch information
afshin authored Oct 29, 2024
1 parent 5b3cdf2 commit 08ff0b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jupyter_events/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ def emit(
# If no handlers are routing these events, there's no need to proceed.
if (
not self.handlers
and not self._modified_listeners[schema_id]
and not self._unmodified_listeners[schema_id]
and not self._modified_listeners.get(schema_id)
and not self._unmodified_listeners.get(schema_id)
):
return None

Expand Down

0 comments on commit 08ff0b9

Please sign in to comment.