Fix Bootstrapper plugin py3 compatibility

This commit is contained in:
shortcutme 2019-04-15 22:15:42 +02:00
parent 446641c31c
commit 54ff940c2b
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
3 changed files with 16 additions and 16 deletions

View file

@ -8,7 +8,7 @@ from Db import Db
from util import helper
class BootstrapperDb(Db):
class BootstrapperDb(Db.Db):
def __init__(self):
self.version = 7
self.hash_ids = {} # hash -> id cache
@ -79,7 +79,7 @@ class BootstrapperDb(Db):
def getHashId(self, hash):
if hash not in self.hash_ids:
self.log.debug("New hash: %s" % repr(hash))
self.execute("INSERT OR IGNORE INTO hash ?", {"hash": buffer(hash)})
self.execute("INSERT OR IGNORE INTO hash ?", {"hash": hash})
self.hash_ids[hash] = self.cur.cursor.lastrowid
return self.hash_ids[hash]