entropy.db: skip tables that cannot be dropped on initializeDatabase

This commit is contained in:
Fabio Erculiani
2009-05-02 18:12:14 +02:00
parent 6f9720c002
commit 2c3f9fe24a
+5 -1
View File
@@ -570,7 +570,11 @@ class LocalRepository:
self.checkReadOnly()
my = Schema()
for table in self.listAllTables():
self.cursor.execute("DROP TABLE %s" % (table,))
try:
self.cursor.execute("DROP TABLE %s" % (table,))
except self.dbapi2.OperationalError:
# skip tables that can't be dropped
continue
self.cursor.executescript(my.get_init())
self.databaseStructureUpdates()
# set cache size