Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Make sure sqlite file is closed before we delete it.

  • Loading branch information
cyrusdaboo committed Jun 28, 2016
1 parent 2d83a24 commit 0c0576a534aad91b422673a9dbc19e9eb6379d4e
@@ -42,11 +42,11 @@ def test_migrate(self):
oldDB.createToken(
"urn:uuid:user01", "mailto:attendee@example.com",
"icaluid1", token="token1")
oldDB._db_close()
yield migrateTokensToStore(self.path, self.store)
txn = self.store.newTransaction()
records = yield (txn.imipLookupByToken("token1"))
yield txn.commit()
self.assertEquals(records[0].organizer, "urn:uuid:user01")
self.assertEquals(records[0].attendee, "mailto:attendee@example.com")
self.assertEquals(records[0].icaluid, "icaluid1")
oldDB._db_close()
@@ -1129,6 +1129,7 @@ def do(transaction=self._transaction):

def cleanup():
try:
self.retrieveOldIndex()._db_close() # Must close sqlite file before it is deleted
trash.remove()
self.properties()._removeResource()
except Exception, e:

0 comments on commit 0c0576a

Please sign in to comment.
You can’t perform that action at this time.