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): def emit(self, message):
for callback in self.callbacks: for callback in self.callbacks:
if asyncio.iscoroutine(callback): if asyncio.iscoroutine(callback):
loop = asyncio.get_running_loop() loop = asyncio.get_running_loop()
loop.call_soon( loop.call_soon(
functools.partial( functools.partial(
asyncio.ensure_future, asyncio.ensure_future,
callback(event, index) callback(event, index)
) )
else: )
else:
callback(event, index) callback(event, index)
``` ```