mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-26 23:19:39 +00:00
Minor fix of a deprecation warning
This commit is contained in:
3
gui.py
3
gui.py
@@ -1791,7 +1791,8 @@ if __name__ == "__main__":
|
||||
if task.exception() is not None:
|
||||
exit_event.set()
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
exit_event = asyncio.Event()
|
||||
main_task = loop.create_task(main(exit_event))
|
||||
main_task.add_done_callback(main_exit)
|
||||
|
||||
3
main.py
3
main.py
@@ -149,7 +149,8 @@ logging.getLogger("TwitchDrops.websocket").setLevel(settings.debug_ws)
|
||||
|
||||
# client run
|
||||
exit_status = 0
|
||||
loop = asyncio.get_event_loop()
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
client = Twitch(settings)
|
||||
signal.signal(signal.SIGINT, lambda *_: client.close())
|
||||
signal.signal(signal.SIGTERM, lambda *_: client.close())
|
||||
|
||||
Reference in New Issue
Block a user