mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-26 12:48:36 -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
|
continue
|
||||||
encoded_title = '⚙⚙⚙ ReVanced Build ⚙⚙⚙'.encode('utf-8')
|
encoded_title = '⚙⚙⚙ ReVanced Build ⚙⚙⚙'.encode('utf-8')
|
||||||
|
|
||||||
match entry:
|
if entry == 'ntfy':
|
||||||
case 'ntfy':
|
|
||||||
print('Sending notification through ntfy.sh...')
|
print('Sending notification through ntfy.sh...')
|
||||||
try:
|
try:
|
||||||
url = config[entry]['url']
|
url = config[entry]['url']
|
||||||
|
@ -60,7 +59,7 @@ def send_notif(appstate, error=False):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('Failed!' + str(e))
|
print('Failed!' + str(e))
|
||||||
|
|
||||||
case 'gotify':
|
elif entry == 'gotify':
|
||||||
print('Sending notification through Gotify...')
|
print('Sending notification through Gotify...')
|
||||||
try:
|
try:
|
||||||
url = config[entry]['url']
|
url = config[entry]['url']
|
||||||
|
@ -74,7 +73,7 @@ def send_notif(appstate, error=False):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('Failed!' + str(e))
|
print('Failed!' + str(e))
|
||||||
|
|
||||||
case 'telegram':
|
elif entry == 'telegram':
|
||||||
print('Sending notification through Telegram...')
|
print('Sending notification through Telegram...')
|
||||||
try:
|
try:
|
||||||
chat = config[entry]['chat']
|
chat = config[entry]['chat']
|
||||||
|
@ -92,5 +91,5 @@ def send_notif(appstate, error=False):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
clean_exit(f"Failed!\n{e}", appstate)
|
clean_exit(f"Failed!\n{e}", appstate)
|
||||||
|
|
||||||
case _:
|
else:
|
||||||
print('Don\'t know how to send notifications to ' + entry)
|
print('Don\'t know how to send notifications to ' + entry)
|
||||||
|
|
Loading…
Reference in a new issue