forked from openlp/openlp
Fixed a silent error when OpenOffice fails to open a file.\
Also, added the file name to the exception log and made the exception explicit
This commit is contained in:
parent
3b7debfe81
commit
4399fc108f
|
@ -80,6 +80,10 @@ class OooImport(SongImport):
|
|||
if self.document:
|
||||
self.process_ooo_document()
|
||||
self.close_ooo_file()
|
||||
else:
|
||||
self.log_error(self.filepath)
|
||||
else:
|
||||
self.log_error(self.filepath)
|
||||
self.close_ooo()
|
||||
|
||||
def process_ooo_document(self):
|
||||
|
@ -160,8 +164,8 @@ class OooImport(SongImport):
|
|||
else:
|
||||
self.import_wizard.incrementProgressBar(
|
||||
u'Processing file ' + filepath, 0)
|
||||
except:
|
||||
log.exception("open_ooo_file failed")
|
||||
except AttributeError:
|
||||
log.exception("open_ooo_file failed: %s", url)
|
||||
return
|
||||
|
||||
def close_ooo_file(self):
|
||||
|
|
Loading…
Reference in New Issue