don't fail for update check

This commit is contained in:
2025-12-14 22:16:59 -08:00
parent 8e31da1636
commit d278df09f7
+15 -12
View File
@@ -10,18 +10,21 @@ import json,sys,webbrowser,importlib,tomllib
def update(): def update():
print('checking for updates...') print('checking for updates...')
with open(script_path()+'astrolobot.py','r') as file: try:
current_script=file.read() with open(script_path()+'astrolobot.py','r') as file:
urlretrieve( current_script=file.read()
'https://gitea.sugoidogo.com/SugoiDogo/astrolobot/releases/download/latest/astrolobot.py', urlretrieve(
script_path()+'astrolobot.py' 'https://gitea.sugoidogo.com/SugoiDogo/astrolobot/releases/download/latest/astrolobot.py',
) script_path()+'astrolobot.py'
with open(script_path()+'astrolobot.py','r') as file: )
updated_script=file.read() with open(script_path()+'astrolobot.py','r') as file:
if current_script==updated_script: updated_script=file.read()
print('up to date') if current_script==updated_script:
else: print('up to date')
print('update downloaded, restart script to apply') else:
print('update downloaded, restart script to apply')
except:
print('update check failed, ignoring')
def dependency_setup(): def dependency_setup():
if not path.exists(script_path()+'pip'): if not path.exists(script_path()+'pip'):