Fixed adding new items

This commit is contained in:
BarsTiger
2021-08-20 15:57:24 +03:00
parent 926d88480b
commit f68adc94b6

View File

@@ -396,7 +396,7 @@ while True:
specif.append(input("Type here shop, where item can be bought: ")) specif.append(input("Type here shop, where item can be bought: "))
specif.append(int(input("Type here price of item (without spaces or comas): "))) specif.append(int(input("Type here price of item (without spaces or comas): ")))
database[nameofnewitem] = specif database[nameofnewitem] = specif
basewrite = open('whattobuy.database', 'w+') basewrite = open(basename, 'w+')
json.dump(database, basewrite, indent=3, ensure_ascii=False) json.dump(database, basewrite, indent=3, ensure_ascii=False)
basewrite.close() basewrite.close()
@@ -433,5 +433,3 @@ while True:
elif doing == "228": elif doing == "228":
curses.wrapper(mainmenu) curses.wrapper(mainmenu)