forked from openlp/openlp
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:
commit
317a12751f
@ -732,6 +732,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
self.newbibles[number].session.commit()
|
self.newbibles[number].session.commit()
|
||||||
if not bible_failed:
|
if not bible_failed:
|
||||||
self.newbibles[number].create_meta(u'Version', name)
|
self.newbibles[number].create_meta(u'Version', name)
|
||||||
|
oldbible.close_connection()
|
||||||
delete_file(os.path.join(self.path, filename[0]))
|
delete_file(os.path.join(self.path, filename[0]))
|
||||||
self.incrementProgressBar(unicode(translate(
|
self.incrementProgressBar(unicode(translate(
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'BiblesPlugin.UpgradeWizardForm',
|
||||||
|
@ -1101,3 +1101,7 @@ class OldBibleDB(QtCore.QObject, Manager):
|
|||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def close_connection(self):
|
||||||
|
self.cursor.close()
|
||||||
|
self.connection.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user