From cdd589299061e618851221415f99e6e60161d50f Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Tue, 1 Mar 2022 20:47:20 +0200 Subject: [PATCH] Debug changing email and installation --- modules/change_email.py | 3 +-- modules/gui_manager.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/change_email.py b/modules/change_email.py index 6db4e83..6afd1e0 100644 --- a/modules/change_email.py +++ b/modules/change_email.py @@ -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() diff --git a/modules/gui_manager.py b/modules/gui_manager.py index 66d1470..8d12936 100644 --- a/modules/gui_manager.py +++ b/modules/gui_manager.py @@ -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: