Mercurial > libervia-backend
diff src/memory/sqlite.py @ 1047:5f7f913c05ac
memory: synchronize the upgrade to database v2 to be sure libervia's profile password is read to be written in the config file before its encryption
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 23 May 2014 13:00:35 +0200 |
parents | 65fffdcb97f1 |
children | 9378c80e3408 |
line wrap: on
line diff
--- a/src/memory/sqlite.py Fri May 23 10:03:33 2014 +0200 +++ b/src/memory/sqlite.py Fri May 23 13:00:35 2014 +0200 @@ -813,11 +813,10 @@ return fixConfigOption('libervia', 'passphrase', password, False) d = self.dbpool.runQuery("SELECT value FROM param_ind WHERE category=? AND name=? AND profile_id=?", xmpp_pass_path + (profile_id,)) - d.addCallback(cb) + return d.addCallback(cb) d = self.dbpool.runQuery("SELECT id FROM profiles WHERE name='libervia'") d.addCallback(updateLiberviaConf) - - d = self.dbpool.runQuery("SELECT profile_id,value FROM param_ind WHERE category=? AND name=?", xmpp_pass_path) + d.addCallback(lambda dummy: self.dbpool.runQuery("SELECT profile_id,value FROM param_ind WHERE category=? AND name=?", xmpp_pass_path)) d.addCallback(encrypt_values) return d