added liking by double tapping album art

add exception handling to update.py, prepping for handling script
This commit is contained in:
Brandon4466
2023-03-04 13:46:12 -08:00
parent c66ee19a25
commit 88c877c50f
4 changed files with 23 additions and 9 deletions

View File

@@ -2,6 +2,8 @@ import urllib
from urllib.request import urlopen
from zipfile import ZipFile
from io import BytesIO
from spotipy import exceptions as SpotipyExceptions
from requests import exceptions as RequestsExceptions
while True:
try:
@@ -16,4 +18,8 @@ try:
except urllib.error.HTTPError:
pass
exec(open('spotifycontroller.py').read())
try:
exec(open('spotifycontroller.py').read())
except (RequestsExceptions.HTTPError, SpotipyExceptions.SpotifyException):
print("An error has ocurred, saving and reestablishing application now.")
exec(open('spotifycontroller.py').read())