updated background dominant color calculation
reworked updater to work as handler, will restart if exception
This commit is contained in:
15
update.py
15
update.py
@@ -3,6 +3,7 @@ from urllib.request import urlopen
|
||||
from zipfile import ZipFile
|
||||
from io import BytesIO
|
||||
from time import sleep
|
||||
import subprocess
|
||||
|
||||
|
||||
while True:
|
||||
@@ -23,9 +24,11 @@ except urllib.error.HTTPError:
|
||||
print("No update available.")
|
||||
pass
|
||||
|
||||
try:
|
||||
exec(open('spotifycontroller.py').read())
|
||||
except:
|
||||
print("An error has ocurred, reestablishing the application in 10 seconds.")
|
||||
sleep(10)
|
||||
exec(open('spotifycontroller.py').read())
|
||||
|
||||
while True:
|
||||
try:
|
||||
subprocess.check_call(['python', 'spotifycontroller.py'])
|
||||
except:
|
||||
print("An error has ocurred, reestablishing the application in 10 seconds.")
|
||||
sleep(10)
|
||||
continue
|
||||
Reference in New Issue
Block a user