forked from openlp/openlp
Change presentation log.exceptions to log.warn's
This commit is contained in:
parent
59f520ab6c
commit
9aed776186
@ -125,7 +125,7 @@ class ImpressController(PresentationController):
|
|||||||
try:
|
try:
|
||||||
uno_instance = get_uno_instance(resolver)
|
uno_instance = get_uno_instance(resolver)
|
||||||
except:
|
except:
|
||||||
log.exception(u'Unable to find running instance ')
|
log.warn(u'Unable to find running instance ')
|
||||||
self.start_process()
|
self.start_process()
|
||||||
loop += 1
|
loop += 1
|
||||||
try:
|
try:
|
||||||
@ -136,7 +136,7 @@ class ImpressController(PresentationController):
|
|||||||
"com.sun.star.frame.Desktop", uno_instance)
|
"com.sun.star.frame.Desktop", uno_instance)
|
||||||
return desktop
|
return desktop
|
||||||
except:
|
except:
|
||||||
log.exception(u'Failed to get UNO desktop')
|
log.warn(u'Failed to get UNO desktop')
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_com_desktop(self):
|
def get_com_desktop(self):
|
||||||
@ -151,7 +151,7 @@ class ImpressController(PresentationController):
|
|||||||
try:
|
try:
|
||||||
desktop = self.manager.createInstance(u'com.sun.star.frame.Desktop')
|
desktop = self.manager.createInstance(u'com.sun.star.frame.Desktop')
|
||||||
except AttributeError:
|
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
|
return desktop if desktop else None
|
||||||
|
|
||||||
def get_com_servicemanager(self):
|
def get_com_servicemanager(self):
|
||||||
@ -162,7 +162,7 @@ class ImpressController(PresentationController):
|
|||||||
try:
|
try:
|
||||||
return Dispatch(u'com.sun.star.ServiceManager')
|
return Dispatch(u'com.sun.star.ServiceManager')
|
||||||
except pywintypes.com_error:
|
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')
|
u'Impress Controller has been disabled')
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ class ImpressController(PresentationController):
|
|||||||
else:
|
else:
|
||||||
desktop = self.get_com_desktop()
|
desktop = self.get_com_desktop()
|
||||||
except:
|
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:
|
if not desktop:
|
||||||
return
|
return
|
||||||
docs = desktop.getComponents()
|
docs = desktop.getComponents()
|
||||||
@ -191,7 +191,7 @@ class ImpressController(PresentationController):
|
|||||||
desktop.terminate()
|
desktop.terminate()
|
||||||
log.debug(u'OpenOffice killed')
|
log.debug(u'OpenOffice killed')
|
||||||
except:
|
except:
|
||||||
log.exception(u'Failed to terminate OpenOffice')
|
log.warn(u'Failed to terminate OpenOffice')
|
||||||
|
|
||||||
|
|
||||||
class ImpressDocument(PresentationDocument):
|
class ImpressDocument(PresentationDocument):
|
||||||
@ -244,7 +244,7 @@ class ImpressDocument(PresentationDocument):
|
|||||||
self.document = desktop.loadComponentFromURL(url, u'_blank',
|
self.document = desktop.loadComponentFromURL(url, u'_blank',
|
||||||
0, properties)
|
0, properties)
|
||||||
except:
|
except:
|
||||||
log.exception(u'Failed to load presentation %s' % url)
|
log.warn(u'Failed to load presentation %s' % url)
|
||||||
return False
|
return False
|
||||||
if os.name == u'nt':
|
if os.name == u'nt':
|
||||||
# As we can't start minimized the Impress window gets in the way.
|
# As we can't start minimized the Impress window gets in the way.
|
||||||
@ -323,7 +323,7 @@ class ImpressDocument(PresentationDocument):
|
|||||||
self.presentation = None
|
self.presentation = None
|
||||||
self.document.dispose()
|
self.document.dispose()
|
||||||
except:
|
except:
|
||||||
log.exception("Closing presentation failed")
|
log.warn("Closing presentation failed")
|
||||||
self.document = None
|
self.document = None
|
||||||
self.controller.remove_doc(self)
|
self.controller.remove_doc(self)
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ class ImpressDocument(PresentationDocument):
|
|||||||
log.debug("getPresentation failed to find a presentation")
|
log.debug("getPresentation failed to find a presentation")
|
||||||
return False
|
return False
|
||||||
except:
|
except:
|
||||||
log.exception("getPresentation failed to find a presentation")
|
log.warn("getPresentation failed to find a presentation")
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class PresentationPlugin(Plugin):
|
|||||||
try:
|
try:
|
||||||
self.controllers[controller].start_process()
|
self.controllers[controller].start_process()
|
||||||
except:
|
except:
|
||||||
log.exception(u'Failed to start controller process')
|
log.warn(u'Failed to start controller process')
|
||||||
self.controllers[controller].available = False
|
self.controllers[controller].available = False
|
||||||
self.mediaItem.buildFileMaskString()
|
self.mediaItem.buildFileMaskString()
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ class PresentationPlugin(Plugin):
|
|||||||
try:
|
try:
|
||||||
__import__(modulename, globals(), locals(), [])
|
__import__(modulename, globals(), locals(), [])
|
||||||
except ImportError:
|
except ImportError:
|
||||||
log.exception(u'Failed to import %s on path %s',
|
log.warn(u'Failed to import %s on path %s',
|
||||||
modulename, path)
|
modulename, path)
|
||||||
controller_classes = PresentationController.__subclasses__()
|
controller_classes = PresentationController.__subclasses__()
|
||||||
for controller_class in controller_classes:
|
for controller_class in controller_classes:
|
||||||
|
Loading…
Reference in New Issue
Block a user