Fixed bug #700859: Bible importers do not clean up properly after a failed import.

This commit is contained in:
Raoul Snyman 2011-02-25 08:16:32 +02:00
parent 21cdf9f2f1
commit 6bcbd3526e
1 changed files with 2 additions and 0 deletions

View File

@ -739,6 +739,7 @@ class BibleImportForm(OpenLPWizard):
name=license_version,
filename=unicode(self.field(u'openlp1_location').toString())
)
bible_name = importer.name
if importer.do_import():
self.manager.save_meta_data(license_version, license_version,
license_copyright, license_permissions)
@ -754,3 +755,4 @@ class BibleImportForm(OpenLPWizard):
self.progressLabel.setText(translate(
'BiblesPlugin.ImportWizardForm', 'Your Bible import failed.'))
delete_database(self.plugin.settingsSection, importer.file)
del self.manager.db_cache[bible_name]