From 3b2e68757d5f08cc2383d7b01913154243a804b9 Mon Sep 17 00:00:00 2001 From: DevilXD Date: Sat, 30 Jul 2022 14:15:57 +0200 Subject: [PATCH] Make sure to handle it here --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 009d0c5..2c1ae38 100644 --- a/main.py +++ b/main.py @@ -29,7 +29,7 @@ except ModuleNotFoundError as exc: from twitch import Twitch from settings import Settings from version import __version__ -from exceptions import CaptchaRequired +from exceptions import CaptchaRequired, ExitRequest from constants import SELF_PATH, FORMATTER, LOG_PATH, WINDOW_TITLE @@ -156,6 +156,8 @@ signal.signal(signal.SIGINT, lambda *_: client.close()) signal.signal(signal.SIGTERM, lambda *_: client.close()) try: loop.run_until_complete(client.run()) +except ExitRequest: + pass except CaptchaRequired: exit_status = 1 msg = "Your login attempt was denied by CAPTCHA.\nPlease try again in +12 hours."