dumb stupid dumb stupid dumb stupid dumb stupid dumb

This commit is contained in:
Lynne Megido 2020-08-24 01:14:54 +10:00
parent b3fd31c524
commit a087bbb6a4
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90

View file

@ -27,11 +27,15 @@ class BuypeebSettings:
out_dict = self.__dict__.copy() out_dict = self.__dict__.copy()
out_dict['watchlist'] = {} out_dict['watchlist'] = {}
print(out_dict)
filename = "config.json" filename = "config.json"
if backup: if backup:
filename += ".bak" filename += ".bak"
json.dump(out_dict, open(self.location + filename, 'w')) json.dump(out_dict, open(self.location + filename, 'w'))
self.jwatchlist = {}
def load(self): def load(self):
if not path.isfile(self.location + "config.json"): if not path.isfile(self.location + "config.json"):
os.makedirs(self.location, 0o755, True) os.makedirs(self.location, 0o755, True)