core: sqlite persistentBinaryDict storage fix
This commit is contained in:
parent
a88559442a
commit
75b502fff5
1 changed files with 3 additions and 3 deletions
|
|
@ -302,9 +302,9 @@ class SqliteStorage():
|
|||
def fillPrivates(result):
|
||||
for private in result:
|
||||
key,value = private
|
||||
private_gen[key] = pickle.loads(value,0)
|
||||
private_gen[key] = pickle.loads(str(value))
|
||||
debug(_("loading general private binary values [namespace: %s] from database") % (namespace,))
|
||||
d = self.dbpool.runQuery("SELECT key,value FROM private_gen_bin WHERE namespace=?", namespace).addCallback(fillPrivates)
|
||||
d = self.dbpool.runQuery("SELECT key,value FROM private_gen_bin WHERE namespace=?", (namespace,)).addCallback(fillPrivates)
|
||||
return d.addErrback(lambda x: debug(_("No binary data present in database for namespace %s") % namespace))
|
||||
|
||||
def loadIndPrivatesBinary(self, private_ind, namespace, profile):
|
||||
|
|
@ -316,7 +316,7 @@ class SqliteStorage():
|
|||
def fillPrivates(result):
|
||||
for private in result:
|
||||
key,value = private
|
||||
private_ind[key] = pickle.loads(value,0)
|
||||
private_ind[key] = pickle.loads(str(value))
|
||||
debug(_("loading individual private binary values [namespace: %s] from database") % (namespace,))
|
||||
d = self.dbpool.runQuery("SELECT key,value FROM private_ind_bin WHERE namespace=? AND profile_id=?", (namespace, self.profiles[profile]))
|
||||
d.addCallback(fillPrivates)
|
||||
|
|
|
|||
Loading…
Reference in a new issue