From 9a8101e849488d030231a8e5ef54d6c8236ae749 Mon Sep 17 00:00:00 2001 From: korrykatti Date: Mon, 1 Apr 2024 10:24:48 +0530 Subject: [PATCH] hmm --- index.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/index.py b/index.py index 0e366fc..a6f44be 100644 --- a/index.py +++ b/index.py @@ -255,12 +255,13 @@ def uninstall_app(): # Remove app ID from downloads.txt downloads_file = os.path.join("appfiles", "downloads.txt") if os.path.exists(downloads_file): - with open(downloads_file, "r") as f: + with open(downloads_file, "r+") as f: lines = f.readlines() - with open(downloads_file, "w") as f: + f.seek(0) for line in lines: if not line.strip().startswith(app_id): f.write(line) + f.truncate() else: print("downloads.txt not found.") @@ -269,10 +270,7 @@ def uninstall_app(): # Call cherry() with start and uninstall commands cherry(start_app, uninstall_app) - - - - + # CallBack function for commenu def commenu_callback(choice): if choice == "Community":