Merge excepts together

This commit is contained in:
Jonathan Corwin 2010-06-24 20:42:15 +01:00
parent bbf5ecf0fc
commit 30f8441ce9
2 changed files with 4 additions and 9 deletions

View File

@ -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):

View File

@ -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):