Added code to openlp/plugins/bibles/lib/manager.py to skip old_databases during load. (Would we want to delete them)?-----> Removed this change, reverted back to original code.

Added a routine to openlp/plugins/bibles/lib/db.py to close the DB "Cursor" and "Connection"

Added code to openlp/plugins/bibles/forms/bibleupgradeform.py to "close" the DB so the old DB file can be deleted afrter use.

bzr-revno: 1625
Fixes: https://launchpad.net/bugs/793552
This commit is contained in:
Stevan Pettit 2011-06-10 20:35:41 +01:00 committed by Tim Bentley
commit 317a12751f
2 changed files with 5 additions and 0 deletions

View File

@ -732,6 +732,7 @@ class BibleUpgradeForm(OpenLPWizard):
self.newbibles[number].session.commit()
if not bible_failed:
self.newbibles[number].create_meta(u'Version', name)
oldbible.close_connection()
delete_file(os.path.join(self.path, filename[0]))
self.incrementProgressBar(unicode(translate(
'BiblesPlugin.UpgradeWizardForm',

View File

@ -1101,3 +1101,7 @@ class OldBibleDB(QtCore.QObject, Manager):
]
else:
return None
def close_connection(self):
self.cursor.close()
self.connection.close()