Skip to content

Commit

Permalink
Fix recursion error
Browse files Browse the repository at this point in the history
  • Loading branch information
nexy7574 committed Dec 24, 2024
1 parent c0092c0 commit a18cc12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/niobot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,12 +722,12 @@ async def event_safety_wrapper(*args):
except Exception as e:
self.log.exception("Error in raw event listener %r", func, exc_info=e)

func = event_safety_wrapper
wrapped_func = event_safety_wrapper
self._raw_events.setdefault(event_type, [])
self._raw_events[event_type].append(func)
self.add_event_callback(func, event_type)
self.log.debug("Added raw event listener %r for %r", func, event_type)
return func
self._raw_events[event_type].append(wrapped_func)
self.add_event_callback(wrapped_func, event_type)
self.log.debug("Added raw event listener %r for %r", wrapped_func, event_type)
return wrapped_func
else:
self._events[event_type].append(func)
self.log.debug("Added event listener %r for %r", func, event_type)
Expand Down

0 comments on commit a18cc12

Please sign in to comment.