forked from openlp/openlp
Cleanup exceptions
This commit is contained in:
parent
7f5293c4c8
commit
f487464280
|
@ -72,7 +72,7 @@ class CSVBible(BibleDB):
|
||||||
self.create_book(unicode(line[1], details['encoding']),
|
self.create_book(unicode(line[1], details['encoding']),
|
||||||
line[2], int(line[0]))
|
line[2], int(line[0]))
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
except IOError, IndexError:
|
except (IOError, IndexError):
|
||||||
log.exception(u'Loading books from file failed')
|
log.exception(u'Loading books from file failed')
|
||||||
success = False
|
success = False
|
||||||
finally:
|
finally:
|
||||||
|
|
|
@ -89,7 +89,7 @@ class OpenSongBible(BibleDB):
|
||||||
'Importing <book name> <chapter>...')) %
|
'Importing <book name> <chapter>...')) %
|
||||||
(db_book.name, int(chapter.attrib[u'n'])))
|
(db_book.name, int(chapter.attrib[u'n'])))
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
except IOError, AttributeError:
|
except (IOError, AttributeError):
|
||||||
log.exception(u'Loading bible from OpenSong file failed')
|
log.exception(u'Loading bible from OpenSong file failed')
|
||||||
success = False
|
success = False
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue