Merge lp:~phill-ridout/openlp/bug1020915 into lp:openlp

Proposed by Phill
Status: Merged
Merged at revision: 2037
Proposed branch: lp:~phill-ridout/openlp/bug1020915
Merge into: lp:openlp
Diff against target: 32 lines (+10/-2)
1 file modified
openlp/plugins/bibles/lib/opensong.py (+10/-2)
To merge this branch: bzr merge lp:~phill-ridout/openlp/bug1020915
Reviewer Review Type Date Requested Status
Jonathan Corwin (community) Approve
Samuel Findlay (community) Approve
Tim Bentley Approve
Review via email: mp+116131@code.launchpad.net

This proposal supersedes a proposal from 2012-07-20.

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal

Looks Ok to me but cannot test

review: Approve
Revision history for this message
Samuel Findlay (sfindlay) wrote : Posted in a previous version of this proposal

I think "bible" in the string should be capitalised (see http://manual.openlp.org/bibles.html#bible-import-wizard).

Otherwise, looks good.

review: Needs Fixing
Revision history for this message
Tim Bentley (trb143) :
review: Approve
Revision history for this message
Samuel Findlay (sfindlay) :
review: Approve
Revision history for this message
Jonathan Corwin (j-corwin) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/plugins/bibles/lib/opensong.py'
2--- openlp/plugins/bibles/lib/opensong.py 2012-06-22 14:14:53 +0000
3+++ openlp/plugins/bibles/lib/opensong.py 2012-07-21 21:34:36 +0000
4@@ -27,9 +27,10 @@
5 ###############################################################################
6
7 import logging
8-from lxml import objectify
9+from lxml import etree, objectify
10
11 from openlp.core.lib import Receiver, translate
12+from openlp.core.lib.ui import critical_error_message_box
13 from openlp.plugins.bibles.lib.db import BibleDB, BiblesResourcesDB
14
15 log = logging.getLogger(__name__)
16@@ -113,8 +114,15 @@
17 (db_book.name, int(chapter.attrib[u'n'].split()[-1])))
18 self.session.commit()
19 Receiver.send_message(u'openlp_process_events')
20+ except etree.XMLSyntaxError as inst:
21+ critical_error_message_box(
22+ message=translate('BiblesPlugin.OpenSongImport',
23+ 'Incorrect Bible file type supplied. OpenSong Bibles may be '
24+ 'compressed. You must decompress them before import.'))
25+ log.exception(inst)
26+ success = False
27 except (IOError, AttributeError):
28- log.exception(u'Loading bible from OpenSong file failed')
29+ log.exception(u'Loading Bible from OpenSong file failed')
30 success = False
31 finally:
32 if file: