chg: More verbose errors

This commit is contained in:
Sayantan Santra 2023-08-27 21:09:49 -05:00
parent af244d5a33
commit 3fa866b90e
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
2 changed files with 3 additions and 3 deletions

View file

@ -73,7 +73,7 @@ def get_apks(appstate):
try: try:
patches = req.get('https://releases.revanced.app/patches').json() patches = req.get('https://releases.revanced.app/patches').json()
except req.exceptions.RequestException as e: except req.exceptions.RequestException as e:
err_exit(e, appstate) err_exit(f"Error fetching patches, {e}", appstate)
session = req.Session() session = req.Session()
session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0'}) session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0'})

View file

@ -54,7 +54,7 @@ def update_microg(appstate):
data = req.get('https://api.github.com/repos/inotia00/VancedMicroG/releases/latest').json()['tag_name'] data = req.get('https://api.github.com/repos/inotia00/VancedMicroG/releases/latest').json()['tag_name']
latest_ver = Version(data) latest_ver = Version(data)
except req.exceptions.RequestException as e: except req.exceptions.RequestException as e:
err_exit(e, appstate) err_exit(f"Error fetching info about Vanced microG, {e}", appstate)
try: try:
present_ver = Version(appstate['present_vers']['VancedMicroG']) present_ver = Version(appstate['present_vers']['VancedMicroG'])
@ -148,7 +148,7 @@ appstate['notification_config'].read('notification_config')
try: try:
tools = req.get('https://releases.revanced.app/tools').json()['tools'] tools = req.get('https://releases.revanced.app/tools').json()['tools']
except req.exceptions.RequestException as e: except req.exceptions.RequestException as e:
err_exit(e, appstate) err_exit(f"Error fetching patch list, {e}", appstate)
try: try:
with open('versions.json', 'r') as f: with open('versions.json', 'r') as f: