Fixed typo

This commit is contained in:
Brandon Rozek 2020-07-11 20:47:46 -04:00
parent 37219ffbb6
commit f8d3348436

View file

@ -11,13 +11,14 @@ class Application:
# ...
def emit(self, message):
for callback in self.callbacks:
if asyncio.iscoroutine(callback):
loop = asyncio.get_running_loop()
loop.call_soon(
functools.partial(
if asyncio.iscoroutine(callback):
loop = asyncio.get_running_loop()
loop.call_soon(
functools.partial(
asyncio.ensure_future,
callback(event, index)
)
else:
callback(event, index)
)
)
else:
callback(event, index)
```