mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-02-23 14:52:02 +00:00
Fixed typo
This commit is contained in:
parent
37219ffbb6
commit
f8d3348436
1 changed files with 8 additions and 7 deletions
|
@ -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)
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue