fix: match not supported before python 3.10

This commit is contained in:
Sayantan Santra 2023-08-10 22:30:12 -05:00
parent 7169cc79e2
commit 37b4d1e172
Signed by: SinTan1729
GPG Key ID: EB3E68BFBA25C85F
1 changed files with 46 additions and 47 deletions

View File

@ -44,8 +44,7 @@ def send_notif(appstate, error=False):
continue
encoded_title = '⚙⚙⚙ ReVanced Build ⚙⚙⚙'.encode('utf-8')
match entry:
case 'ntfy':
if entry == 'ntfy':
print('Sending notification through ntfy.sh...')
try:
url = config[entry]['url']
@ -60,7 +59,7 @@ def send_notif(appstate, error=False):
except Exception as e:
print('Failed!' + str(e))
case 'gotify':
elif entry == 'gotify':
print('Sending notification through Gotify...')
try:
url = config[entry]['url']
@ -74,7 +73,7 @@ def send_notif(appstate, error=False):
except Exception as e:
print('Failed!' + str(e))
case 'telegram':
elif entry == 'telegram':
print('Sending notification through Telegram...')
try:
chat = config[entry]['chat']
@ -92,5 +91,5 @@ def send_notif(appstate, error=False):
except Exception as e:
clean_exit(f"Failed!\n{e}", appstate)
case _:
else:
print('Don\'t know how to send notifications to ' + entry)