diff --git a/openlp/plugins/presentations/lib/powerpointcontroller.py b/openlp/plugins/presentations/lib/powerpointcontroller.py index f5a6c1120..b0b2829d2 100644 --- a/openlp/plugins/presentations/lib/powerpointcontroller.py +++ b/openlp/plugins/presentations/lib/powerpointcontroller.py @@ -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): diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index bcda545ee..10ab41fd0 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -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):