Commit 90a5aa17 authored by Julien Muchembled's avatar Julien Muchembled

sqlite3: fix rare strange exception when table does not exist

Found by running testPruneOrphan many times. Once I even got:

  SystemError: NULL result without error in PyObject_Call
parent 40b6ba64
......@@ -113,7 +113,9 @@ class SQLiteDatabaseManager(DatabaseManager):
try:
return bool(self.query(
"SELECT 1 FROM %s LIMIT 1" % table).fetchone())
except sqlite3.OperationalError as e:
except sqlite3.DatabaseError as e:
# XXX: Not idea why we sometimes get DatabaseError instead of
# the usual OperationalError for 'no such table' error.
if not e.args[0].startswith("no such table:"):
raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment