mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-25 20:28:37 -06:00
fix: match not supported before python 3.10
This commit is contained in:
parent
7169cc79e2
commit
37b4d1e172
1 changed files with 46 additions and 47 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue