forked from openlp/openlp
Merge excepts together
This commit is contained in:
parent
bbf5ecf0fc
commit
30f8441ce9
@ -186,9 +186,7 @@ class PowerpointDocument(PresentationDocument):
|
||||
return False
|
||||
if self.presentation.SlideShowWindow.View is None:
|
||||
return False
|
||||
except AttributeError:
|
||||
return False
|
||||
except pywintypes.com_error:
|
||||
except (AttributeError, pywintypes.com_error):
|
||||
return False
|
||||
return True
|
||||
|
||||
@ -210,9 +208,9 @@ class PowerpointDocument(PresentationDocument):
|
||||
"""
|
||||
Returns true if screen is blank
|
||||
"""
|
||||
try:
|
||||
if self.is_active():
|
||||
return self.presentation.SlideShowWindow.View.State == 3
|
||||
except pywintypes.com_error:
|
||||
else:
|
||||
return False
|
||||
|
||||
def stop_presentation(self):
|
||||
|
@ -58,10 +58,7 @@ class PptviewController(PresentationController):
|
||||
log.debug(u'check_available')
|
||||
if os.name != u'nt':
|
||||
return False
|
||||
try:
|
||||
return self.check_installed()
|
||||
except:
|
||||
return False
|
||||
return self.check_installed()
|
||||
|
||||
if os.name == u'nt':
|
||||
def check_installed(self):
|
||||
|
Loading…
Reference in New Issue
Block a user