Final refactor
This commit is contained in:
4
horsy.py
4
horsy.py
@@ -46,11 +46,11 @@ if not os.path.isfile(horsy_vars.horsypath + 'config.cfg'):
|
||||
try:
|
||||
with open(horsy_vars.horsypath + 'apps/version', 'r') as f:
|
||||
version = int(f.read())
|
||||
if int(requests.get('https://github.com/BarsTiger/horsy/raw/master/web_vars/version').text) > version:
|
||||
if int(requests.get('https://github.com/horsy-ml/horsy/raw/master/web_vars/version').text) > version:
|
||||
print('New version available!')
|
||||
input('Press enter to update...')
|
||||
with open(os.path.join(horsy_vars.horsypath) + '/horsy_updater.exe', 'wb') as f:
|
||||
f.write(requests.get('https://github.com/BarsTiger/horsy/raw/master/bin/horsy_updater.exe').content)
|
||||
f.write(requests.get('https://github.com/horsy-ml/horsy/raw/master/bin/horsy_updater.exe').content)
|
||||
os.system('horsy_updater.exe horsy')
|
||||
sys.exit(0)
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user