Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
flatsiedatsie authored Jul 11, 2022
1 parent 4f0a77f commit 9255972
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/presence_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, verbose=False):
#print("Adapter ID = " + self.get_id())

self.mayor_version = 2
#self.meso_version = 0
self.meso_version = 0

self.DEBUG = False
self.ready = False
Expand Down Expand Up @@ -107,7 +107,7 @@ def __init__(self, verbose=False):
self.previous_data = json.load(file_object)
if 'mayor_version' in self.previous_data:
#if self.DEBUG:
print("Persistent data was loaded succesfully") # debug will never be true here unless set in the code above
#print("Persistent data was loaded succesfully") # debug will never be true here unless set in the code above
if 'devices' in self.previous_data:
self.previously_found = self.previous_data['devices']
else:
Expand Down Expand Up @@ -1906,7 +1906,10 @@ def save_to_json(self):
#with open(self.persistence_file_path, 'w') as fp:
#json.dump(self.previously_found, fp)

data_to_write = {'devices':self.previously_found,'mayor_version':self.mayor_version}
data_to_write = {'devices':self.previously_found,
'mayor_version':self.mayor_version,
'meso_version':self.meso_version
}

j = json.dumps(data_to_write, indent=4) # Pretty printing to the file
f = open(self.persistence_file_path, 'w')
Expand Down

0 comments on commit 9255972

Please sign in to comment.