log when json file does not exist

This commit is contained in:
augustin_s committed 2026-09-26 13:12:12 +02:00
1 parent 909a1a48e5
commit eccc25b373
1 file changed
+7 -1
+7 -1
View File
@@ -41,10 +41,16 @@ class BufferedJSON:
return {}
return json_load(self.fname, *args, **kwargs)
def exists(self):
if not self.fname:
log.warning("filename not given")
return False
return os.path.exists(self.fname)
res = os.path.exists(self.fname)
if not res:
log.warning(f"{self.fname} does not exist")
return res