Better folder structure, added a few ambient sensors
This commit is contained in:
@@ -12,10 +12,12 @@ class PersistentDict(dict):
|
||||
|
||||
self.path = file_name
|
||||
self.last_action = ""
|
||||
if not os.path.exists(self.path):
|
||||
try:
|
||||
self.read_dict()
|
||||
except:
|
||||
with open(self.path, "a") as f:
|
||||
f.write("{}")
|
||||
self.read_dict()
|
||||
|
||||
|
||||
## helper - functions
|
||||
def write_dict(self):
|
||||
|
Reference in New Issue
Block a user