Debug changing email and installation

This commit is contained in:
BarsTiger
2022-03-01 20:47:20 +02:00
parent 005fbb47f9
commit cdd5892990
2 changed files with 4 additions and 2 deletions

View File

@@ -23,8 +23,7 @@ def change(email):
try:
r_code = handle(requests.put(horsy_vars.protocol + horsy_vars.server_url + '/users',
json={'auth': auth, 'email': email}).status_code)
if r_code[1] not in [200, 201]:
gui.cpopup("Error", r_code[0])
gui.cpopup("Changing email", r_code[0])
except:
gui.cpopup('Error', 'Unexpected error.')
threading.Thread(target=change_in_new_thread).start()

View File

@@ -126,6 +126,9 @@ def install(package):
download_ui.logs_box.append("")
download_ui.logs_box.moveCursor(QtGui.QTextCursor.End)
if r['url'].split('.')[-1] == 'zip':
os.remove('{2}apps/{0}/{1}'.format(r['name'], r['url'].split('/')[-1], horsy_vars.horsypath))
download_ui.logs_box.append("")
download_ui.logs_box.append("Generating launch script")
with open('{1}apps/{0}.bat'.format(r['name'], horsy_vars.horsypath), 'w') as f: