openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #09768
[Merge] lp:~j-corwin/openlp/bug-792200 into lp:openlp
Jonathan Corwin has proposed merging lp:~j-corwin/openlp/bug-792200 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #792200 in OpenLP: "Change log.error to log.warn in presentation controller detection code"
https://bugs.launchpad.net/openlp/+bug/792200
For more details, see:
https://code.launchpad.net/~j-corwin/openlp/bug-792200/+merge/63333
Change some unexceptional log.exceptions to log.warns in presentations
--
https://code.launchpad.net/~j-corwin/openlp/bug-792200/+merge/63333
Your team OpenLP Core is requested to review the proposed merge of lp:~j-corwin/openlp/bug-792200 into lp:openlp.
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2011-05-26 17:11:22 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2011-06-03 06:56:29 +0000
@@ -125,7 +125,7 @@
try:
uno_instance = get_uno_instance(resolver)
except:
- log.exception(u'Unable to find running instance ')
+ log.warn(u'Unable to find running instance ')
self.start_process()
loop += 1
try:
@@ -136,7 +136,7 @@
"com.sun.star.frame.Desktop", uno_instance)
return desktop
except:
- log.exception(u'Failed to get UNO desktop')
+ log.warn(u'Failed to get UNO desktop')
return None
def get_com_desktop(self):
@@ -151,7 +151,7 @@
try:
desktop = self.manager.createInstance(u'com.sun.star.frame.Desktop')
except AttributeError:
- log.exception(u'Failure to find desktop - Impress may have closed')
+ log.warn(u'Failure to find desktop - Impress may have closed')
return desktop if desktop else None
def get_com_servicemanager(self):
@@ -162,7 +162,7 @@
try:
return Dispatch(u'com.sun.star.ServiceManager')
except pywintypes.com_error:
- log.exception(u'Failed to get COM service manager. '
+ log.warn(u'Failed to get COM service manager. '
u'Impress Controller has been disabled')
return None
@@ -180,7 +180,7 @@
else:
desktop = self.get_com_desktop()
except:
- log.exception(u'Failed to find an OpenOffice desktop to terminate')
+ log.warn(u'Failed to find an OpenOffice desktop to terminate')
if not desktop:
return
docs = desktop.getComponents()
@@ -191,7 +191,7 @@
desktop.terminate()
log.debug(u'OpenOffice killed')
except:
- log.exception(u'Failed to terminate OpenOffice')
+ log.warn(u'Failed to terminate OpenOffice')
class ImpressDocument(PresentationDocument):
@@ -244,7 +244,7 @@
self.document = desktop.loadComponentFromURL(url, u'_blank',
0, properties)
except:
- log.exception(u'Failed to load presentation %s' % url)
+ log.warn(u'Failed to load presentation %s' % url)
return False
if os.name == u'nt':
# As we can't start minimized the Impress window gets in the way.
@@ -323,7 +323,7 @@
self.presentation = None
self.document.dispose()
except:
- log.exception("Closing presentation failed")
+ log.warn("Closing presentation failed")
self.document = None
self.controller.remove_doc(self)
@@ -341,7 +341,7 @@
log.debug("getPresentation failed to find a presentation")
return False
except:
- log.exception("getPresentation failed to find a presentation")
+ log.warn("getPresentation failed to find a presentation")
return False
return True
=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py 2011-05-28 18:47:14 +0000
+++ openlp/plugins/presentations/presentationplugin.py 2011-06-03 06:56:29 +0000
@@ -77,7 +77,7 @@
try:
self.controllers[controller].start_process()
except:
- log.exception(u'Failed to start controller process')
+ log.warn(u'Failed to start controller process')
self.controllers[controller].available = False
self.mediaItem.buildFileMaskString()
@@ -128,7 +128,7 @@
try:
__import__(modulename, globals(), locals(), [])
except ImportError:
- log.exception(u'Failed to import %s on path %s',
+ log.warn(u'Failed to import %s on path %s',
modulename, path)
controller_classes = PresentationController.__subclasses__()
for controller_class in controller_classes:
Follow ups