← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~m2j/openlp/smallfix into lp:openlp

 

m2j has proposed merging lp:~m2j/openlp/smallfix into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~m2j/openlp/smallfix/+merge/83484

layout fix in exceptionform
bug fix triggerd by searching for nonexistend book numbers
-- 
https://code.launchpad.net/~m2j/openlp/smallfix/+merge/83484
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/smallfix into lp:openlp.
=== modified file 'openlp/core/ui/exceptiondialog.py'
--- openlp/core/ui/exceptiondialog.py	2011-06-12 16:02:52 +0000
+++ openlp/core/ui/exceptiondialog.py	2011-11-26 19:20:31 +0000
@@ -39,6 +39,8 @@
         self.messageLayout.addSpacing(12)
         self.bugLabel = QtGui.QLabel(exceptionDialog)
         self.bugLabel.setPixmap(QtGui.QPixmap(u':/graphics/exception.png'))
+        self.bugLabel.setSizePolicy(QtGui.QSizePolicy.Fixed,
+            QtGui.QSizePolicy.Fixed)
         self.bugLabel.setObjectName(u'bugLabel')
         self.messageLayout.addWidget(self.bugLabel)
         self.messageLayout.addSpacing(12)

=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py	2011-10-03 20:12:57 +0000
+++ openlp/plugins/bibles/lib/db.py	2011-11-26 19:20:31 +0000
@@ -638,14 +638,14 @@
         chapters = BiblesResourcesDB.run_sql(u'SELECT id, book_reference_id, '
             u'chapter, verse_count FROM chapters WHERE book_reference_id = ?',
             (book_id,))
-        if chapters:
+        try:
             return {
                 u'id': chapters[chapter-1][0],
                 u'book_reference_id': chapters[chapter-1][1],
                 u'chapter': chapters[chapter-1][2],
                 u'verse_count': chapters[chapter-1][3]
             }
-        else:
+        except (IndexError, TypeError):
             return None
 
     @staticmethod
@@ -753,7 +753,7 @@
             u'language_id, download_source_id FROM webbibles WHERE '
             u'download_source_id = ? AND abbreviation = ?', (source[u'id'],
             abbreviation))
-        if bible:
+        try:
             return {
                 u'id': bible[0][0],
                 u'name': bible[0][1],
@@ -761,7 +761,7 @@
                 u'language_id': bible[0][3],
                 u'download_source_id': bible[0][4]
                 }
-        else:
+        except (IndexError, TypeError):
             return None
 
     @staticmethod


Follow ups