We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e101a27 commit 8207a93Copy full SHA for 8207a93
sleep_inhibitor.py
@@ -201,15 +201,14 @@ def init():
201
plugin_dir, inhibitor_prog)
202
for index, plugin in enumerate(plugins, 1)]
203
204
-async def run():
205
- 'Main entry'
206
- tasks = init()
207
-
208
- # Wait for each plugin task to finish (i.e. wait forever)
+async def run(tasks):
+ 'Wait for each plugin task to finish (i.e. wait forever)'
209
await asyncio.gather(*(t.run() for t in tasks))
210
211
def main():
212
- asyncio.run(run())
+ 'Main entry'
+ tasks = init()
+ asyncio.run(run(tasks))
213
214
if __name__ == '__main__':
215
main()
0 commit comments