def saveAccounts(self): """save all account information""" # TODO: multi user # TODO: activated data = [] for name, plugin in self.accounts.iteritems(): data.extend([(name, acc.loginname, 1 if acc.activated else 0, acc.password, json.dumps(acc.options)) for acc in plugin.itervalues()]) self.core.db.saveAccounts(data)
def saveAccounts(self): """save all account information""" # TODO: multi user # TODO: activated data = [] for name, plugin in self.accounts.iteritems(): data.extend( [(name, acc.loginname, 1 if acc.activated else 0, acc.password, json.dumps(acc.options)) for acc in plugin.itervalues()]) self.core.db.saveAccounts(data)
def saveValues(self, user, section): if section in self.parser and user is None: self.save() elif (user, section) in self.values: self.db.saveConfig(section, json.dumps(self.values[user, section]), user)