older pysqlite can't auto-convert unicode to utf-8

This commit is contained in:
Damien Elmes 2010-08-24 13:09:59 +09:00
parent 65bc9ec3f2
commit b36b670043

View file

@ -110,7 +110,8 @@ class Sync(QThread):
try:
if deck:
# multi-mode setup
c = sqlite.connect(deck)
sqlpath = deck.encode("utf-8")
c = sqlite.connect(sqlpath)
(syncName, localMod, localSync) = c.execute(
"select syncName, modified, lastSync from decks").fetchone()
c.close()
@ -120,7 +121,8 @@ class Sync(QThread):
else:
syncName = self.parent.syncName
path = self.parent.deckPath
c = sqlite.connect(path)
sqlpath = path.encode("utf-8")
c = sqlite.connect(sqlpath)
(localMod, localSync) = c.execute(
"select modified, lastSync from decks").fetchone()
c.close()