← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~smpettit/openlp/bug-793522 into lp:openlp

 

Stevan Pettit has proposed merging lp:~smpettit/openlp/bug-793522 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~smpettit/openlp/bug-793522/+merge/64111

Fixed bug 793552.

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.

See note --->  above
-- 
https://code.launchpad.net/~smpettit/openlp/bug-793522/+merge/64111
Your team OpenLP Core is requested to review the proposed merge of lp:~smpettit/openlp/bug-793522 into lp:openlp.
=== modified file 'openlp/plugins/bibles/forms/bibleupgradeform.py'
--- openlp/plugins/bibles/forms/bibleupgradeform.py	2011-06-05 17:39:13 +0000
+++ openlp/plugins/bibles/forms/bibleupgradeform.py	2011-06-10 03:31:02 +0000
@@ -732,6 +732,7 @@
                     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', 

=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py	2011-06-04 13:52:26 +0000
+++ openlp/plugins/bibles/lib/db.py	2011-06-10 03:31:02 +0000
@@ -1101,3 +1101,7 @@
             ]
         else:
             return None
+
+    def close_connection(self):
+        self.cursor.close()
+        self.connection.close()


Follow ups