account for old pysqlite versions

This commit is contained in:
Damien Elmes 2012-02-02 11:45:57 +09:00
parent 1604eb29d6
commit 40e7a93639

View file

@ -28,7 +28,11 @@ class ProgressManager(object):
"Install a handler in the current DB." "Install a handler in the current DB."
self.lastDbProgress = 0 self.lastDbProgress = 0
self.inDB = False self.inDB = False
db.set_progress_handler(self._dbProgress, 10000) try:
db.set_progress_handler(self._dbProgress, 10000)
except:
print """\
Your pysqlite2 is too old. Anki will appear frozen during long operations."""
def _dbProgress(self): def _dbProgress(self):
"Called from SQLite." "Called from SQLite."