Merge pull request #427 from agoose77/trigger_cleanup
Simplify trigger events (now guaranteeed to receive list of events)
This commit is contained in:
commit
dddc18d77c
|
@ -256,9 +256,6 @@ def trigger_events(events, loop):
|
||||||
:param events: one or more sync or async functions to execute
|
:param events: one or more sync or async functions to execute
|
||||||
:param loop: event loop
|
:param loop: event loop
|
||||||
"""
|
"""
|
||||||
if events:
|
|
||||||
if not isinstance(events, list):
|
|
||||||
events = [events]
|
|
||||||
for event in events:
|
for event in events:
|
||||||
result = event(loop)
|
result = event(loop)
|
||||||
if isawaitable(result):
|
if isawaitable(result):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user