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:
|
||||
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 @@ class ImpressController(PresentationController):
|
||||
"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 @@ class ImpressController(PresentationController):
|
||||
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 @@ class ImpressController(PresentationController):
|
||||
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 @@ class ImpressController(PresentationController):
|
||||
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 @@ class ImpressController(PresentationController):
|
||||
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 @@ class ImpressDocument(PresentationDocument):
|
||||
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 @@ class ImpressDocument(PresentationDocument):
|
||||
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 @@ class ImpressDocument(PresentationDocument):
|
||||
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
|
||||
|
||||
|
@ -77,7 +77,7 @@ class PresentationPlugin(Plugin):
|
||||
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 @@ class PresentationPlugin(Plugin):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user