From f68adc94b68e1609cf32bd6afcca53b46151b750 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Fri, 20 Aug 2021 15:57:24 +0300 Subject: [PATCH] Fixed adding new items --- GTAwhatToBuy/GTAwhatToBuy.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GTAwhatToBuy/GTAwhatToBuy.py b/GTAwhatToBuy/GTAwhatToBuy.py index 8103ba3..6122da2 100644 --- a/GTAwhatToBuy/GTAwhatToBuy.py +++ b/GTAwhatToBuy/GTAwhatToBuy.py @@ -396,7 +396,7 @@ while True: specif.append(input("Type here shop, where item can be bought: ")) specif.append(int(input("Type here price of item (without spaces or comas): "))) database[nameofnewitem] = specif - basewrite = open('whattobuy.database', 'w+') + basewrite = open(basename, 'w+') json.dump(database, basewrite, indent=3, ensure_ascii=False) basewrite.close() @@ -433,5 +433,3 @@ while True: elif doing == "228": curses.wrapper(mainmenu) - -