Skip to content
Snippets Groups Projects
Commit fdb8448a authored by jkerdreu's avatar jkerdreu
Browse files

- Added support for UUID sorting

- Sort UUID in metadb




git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@3018 b32b6428-25c9-4566-ad07-03861ab6144f
parent 2b150ed9
Branches
No related tags found
No related merge requests found
......@@ -129,6 +129,7 @@ class MetaDB(object):
def periodic_save(self):
if self.dirty:
self.cfg['devices'] = {key: val for key, val in sorted(self.cfg['devices'].items(), key = lambda ele: ele[0])}
logger.info("Saving configuration file")
self.cfg.write()
self.dirty = False
......
......@@ -34,6 +34,12 @@ class UUID:
def __eq__(self,value):
return self.__uuid == value
def __lt__(self, value ):
return self.__uuid.int < value
def __gt__(self, value ):
return self.__uuid.int > value
def __str__(self):
return str(self.__uuid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment