Skip to content

Conversation

@rettier
Copy link
Contributor

@rettier rettier commented Jan 29, 2018

In the async namespace's trigger_event routine the ret variable is not assigned any value if the async task is canceled. This causes some IMO unnecessary exceptions.

try:
ret = await handler(*args)
except asyncio.CancelledError: # pragma: no cover
pass

I have assigned it to none as it is done in

try:
ret = await self.handlers[namespace][event](*args)
except asyncio.CancelledError: # pragma: no cover
ret = None

@miguelgrinberg miguelgrinberg merged commit 598568c into miguelgrinberg:master Jan 29, 2018
@miguelgrinberg
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants