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:
|
if self.document:
|
||||||
self.process_ooo_document()
|
self.process_ooo_document()
|
||||||
self.close_ooo_file()
|
self.close_ooo_file()
|
||||||
|
else:
|
||||||
|
self.log_error(self.filepath)
|
||||||
|
else:
|
||||||
|
self.log_error(self.filepath)
|
||||||
self.close_ooo()
|
self.close_ooo()
|
||||||
|
|
||||||
def process_ooo_document(self):
|
def process_ooo_document(self):
|
||||||
@ -160,8 +164,8 @@ class OooImport(SongImport):
|
|||||||
else:
|
else:
|
||||||
self.import_wizard.incrementProgressBar(
|
self.import_wizard.incrementProgressBar(
|
||||||
u'Processing file ' + filepath, 0)
|
u'Processing file ' + filepath, 0)
|
||||||
except:
|
except AttributeError:
|
||||||
log.exception("open_ooo_file failed")
|
log.exception("open_ooo_file failed: %s", url)
|
||||||
return
|
return
|
||||||
|
|
||||||
def close_ooo_file(self):
|
def close_ooo_file(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user