Debug load config with outfile

This commit is contained in:
Ambulance Clerc
2023-04-21 07:57:00 +02:00
parent 513556f0a3
commit 9ba8998c32
3 changed files with 4 additions and 2 deletions

View File

@@ -128,6 +128,8 @@ class ClercAttrib2Biz():
with open(os.path.join(temp_dir,"config.dat"),"wb") as pickle_file:
pickle.dump(self.config,pickle_file, pickle.HIGHEST_PROTOCOL)
def load_config(self):
if not os.path.exists(os.path.join(temp_dir, "config.dat")):
self.save_config()
with open(os.path.join(temp_dir, "config.dat"), "rb") as pickle_file:
self.config = pickle.load(pickle_file)