Make sure to handle it here

This commit is contained in:
DevilXD committed 2022-07-30 14:15:57 +02:00
1 parent 2e1711cf05
commit 3b2e68757d
1 file changed
+3 -1
+3 -1
View File
@@ -29,7 +29,7 @@ except ModuleNotFoundError as exc:
from twitch import Twitch from twitch import Twitch
from settings import Settings from settings import Settings
from version import __version__ from version import __version__
from exceptions import CaptchaRequired from exceptions import CaptchaRequired, ExitRequest
from constants import SELF_PATH, FORMATTER, LOG_PATH, WINDOW_TITLE 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()) signal.signal(signal.SIGTERM, lambda *_: client.close())
try: try:
loop.run_until_complete(client.run()) loop.run_until_complete(client.run())
except ExitRequest:
pass
except CaptchaRequired: except CaptchaRequired:
exit_status = 1 exit_status = 1
msg = "Your login attempt was denied by CAPTCHA.\nPlease try again in +12 hours." msg = "Your login attempt was denied by CAPTCHA.\nPlease try again in +12 hours."