From cf0608cc45756a54ea9e56500a1f8e29c9e73e2c Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 11 Jan 2011 17:13:17 +0000 Subject: [PATCH] Increase ooo verbosity to aid debugging --- openlp/plugins/presentations/lib/impresscontroller.py | 11 +++++------ openlp/plugins/songs/lib/oooimport.py | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py index d7407b729..7c8cf593d 100644 --- a/openlp/plugins/presentations/lib/impresscontroller.py +++ b/openlp/plugins/presentations/lib/impresscontroller.py @@ -169,7 +169,7 @@ class ImpressController(PresentationController): try: return Dispatch(u'com.sun.star.ServiceManager') except pywintypes.com_error: - log.warn(u'Failed to get COM service manager. ' + log.exception(u'Failed to get COM service manager. ' u'Impress Controller has been disabled') return None @@ -257,7 +257,6 @@ class ImpressDocument(PresentationDocument): except: log.exception(u'Failed to load presentation %s' % url) return False - self.presentation = self.document.getPresentation() self.presentation.Display = \ self.controller.plugin.renderManager.screens.current_display + 1 @@ -327,8 +326,7 @@ class ImpressDocument(PresentationDocument): self.presentation = None self.document.dispose() except: - #We tried! - pass + log.exception("Closing presentation failed") self.document = None self.controller.remove_doc(self) @@ -339,13 +337,14 @@ class ImpressDocument(PresentationDocument): log.debug(u'is loaded OpenOffice') #print "is_loaded " if self.presentation is None or self.document is None: - #print "no present or document" + log.debug("is_loaded: no presentation or document") return False try: if self.document.getPresentation() is None: - #print "no getPresentation" + log.debug("getPresentation failed to find a presentation") return False except: + log.exception("getPresentation failed to find a presentation") return False return True diff --git a/openlp/plugins/songs/lib/oooimport.py b/openlp/plugins/songs/lib/oooimport.py index b467eab65..42ddfcdd1 100644 --- a/openlp/plugins/songs/lib/oooimport.py +++ b/openlp/plugins/songs/lib/oooimport.py @@ -116,7 +116,7 @@ class OooImport(SongImport): + u'socket,host=localhost,port=2002;' \ + u'urp;StarOffice.ComponentContext') except: - pass + log.exception("Failed to resolve uno connection") self.start_ooo_process() loop += 1 manager = ctx.ServiceManager @@ -143,7 +143,7 @@ class OooImport(SongImport): process.waitForStarted() self.process_started = True except: - pass + log.exception("start_ooo_process failed") def open_ooo_file(self, filepath): """ @@ -167,7 +167,7 @@ class OooImport(SongImport): self.import_wizard.incrementProgressBar( u'Processing file ' + filepath, 0) except: - pass + log.exception("open_ooo_file failed") return def close_ooo_file(self): @@ -232,4 +232,4 @@ class OooImport(SongImport): text += paratext + u'\n' songs = SongImport.process_songs_text(self.manager, text) for song in songs: - song.finish() \ No newline at end of file + song.finish()