示例#1
0
    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)
示例#3
0
 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)
示例#4
0
 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)