def load(self, desc=''): db = Configurable.__db__ conf = db.open(type='configuration', mode='r') db.close('configuration') if not desc in conf: error( self, 'A configuration with the description \'' + desc + '\' does not exist') raise Exception('') return # id = self.getConfId(desc, conf) # if id != None: # self.__id__ = id # else: # error(self, 'A configuration with the description \''+desc+'\' does not exist') # Remove the date and description conf[desc].pop('date') conf[desc].pop('desc') # Open the database db_root = db.open(type='system', mode='a') # Let the fun begin getattr(db_root,'i%d'%self.__id__) Configurable.__load__(self, db_root, conf[desc]['s']) # Close the database db.close() Configurable.__refreshEclipse__(self)
def load(self, desc=''): db = Configurable.__db__ conf = db.open(type='configuration', mode='r') db.close('configuration') if not desc in conf: error(self, 'A configuration with the description \''+desc+'\' does not exist') raise Exception('') return # id = self.getConfId(desc, conf) # if id != None: # self.__id__ = id # else: # error(self, 'A configuration with the description \''+desc+'\' does not exist') # Remove the date and description conf[desc].pop('date') conf[desc].pop('desc') # Open the database db_root = db.open(type='system', mode='a') # Let the fun begin getattr(db_root,'i%d'%self.__id__) Configurable.__load__(self, db_root, conf[desc]['s']) # Close the database db.close() Configurable.__refreshEclipse__(self)