From 764f008864f0d7944ea9fb9f61ba866e7fbd1872 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Thu, 24 Feb 2022 22:36:27 +0200 Subject: [PATCH] Debug --- horsygui.py | 2 +- modules/gui_manager.py | 15 ++++++++------- modules/manager.py | 1 - 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/horsygui.py b/horsygui.py index 98357fc..feff723 100644 --- a/horsygui.py +++ b/horsygui.py @@ -73,7 +73,7 @@ def uninstall_app(): if app_name == "": return else: - from modules.manager import uninstall + from modules.gui_manager import uninstall uninstall(app_name) installed_apps() except: diff --git a/modules/gui_manager.py b/modules/gui_manager.py index ba02f99..dda3116 100644 --- a/modules/gui_manager.py +++ b/modules/gui_manager.py @@ -8,7 +8,7 @@ import os import zipfile from modules.virustotal import get_key, scan_file, get_report from horsygui import UiDownloadWindow, download_ui -from modules.gui import popup +from modules.gui import popup, cpopup success = 0 @@ -53,7 +53,7 @@ def install(package): if chunk: percent += 1 f.write(chunk) - + download_ui.logs_box.append("") if not get_key(): download_ui.logs_box.append("Virustotal api key not found \n" "You can add it by entering horsy --vt [key] in terminal") @@ -93,6 +93,7 @@ def install(package): for chunk in file_r.iter_content(chunk_size=chunk_size): if chunk: f.write(chunk) + download_ui.logs_box.append("") download_ui.logs_box.append(f"Starting virustotal scan for dependency") if not get_key(): download_ui.logs_box.append(f"Virustotal api key not found") @@ -135,7 +136,7 @@ def install(package): download_ui.logs_box.append(f"Found install option") threading.Thread(target=os.system, args=('{2}apps/{0}/{1}'.format(r['name'], r['install'], horsy_vars.horsypath),)).start() - download_ui.logs_box.append(f"All done!\n You can run your app by entering {r['name']} in terminal") + download_ui.logs_box.append(f"All done!\nYou can run your app by entering {r['name']} in terminal") return threading.Thread(target=wait_for_success).start() @@ -146,11 +147,11 @@ def install(package): def uninstall(package, login_ui=None, Ui_LoginWindow=None): if os.path.exists('{1}apps/{0}'.format(package, horsy_vars.horsypath)): os.system('rmdir /s /q "{1}apps/{0}"'.format(package, horsy_vars.horsypath)) - print(f"[green][OK] Files deleted[/]") + cpopup("Uninstallation", f"Files deleted") else: - print(f"[red]App {package} is not installed or doesn't have files[/]") + cpopup("Uninstallation", f"App {package} is not installed or doesn't have files") if os.path.isfile('{1}apps/{0}.bat'.format(package, horsy_vars.horsypath)): os.remove("{1}apps/{0}.bat".format(package, horsy_vars.horsypath)) - print(f"[green][OK] Launch script deleted[/]") + cpopup("Uninstallation", f"Launch script deleted") else: - print(f"[red]App {package} is not installed or doesn't have launch script[/]") + cpopup("Uninstallation", f"App {package} is not installed or doesn't have launch script") diff --git a/modules/manager.py b/modules/manager.py index fda9035..db1add0 100644 --- a/modules/manager.py +++ b/modules/manager.py @@ -22,7 +22,6 @@ def install(package): try: # Inform the user print(f"[green]App {r['name']} found, information loaded[/]") - print() # Create the app directory if not os.path.exists('{1}apps\{0}'.format(r['name'], horsy_vars.horsypath)):