openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01276
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Simplify the tests to improve readability and remove unused variables
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/21986
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-03-23 19:41:54 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-03-23 21:55:24 +0000
@@ -147,9 +147,8 @@
Called at system exit to clean up any running presentations
"""
log.debug(u'Kill OpenOffice')
- for i in range(len(self.docs)):
- self.docs[0].close_presentation() # Yes, always the zeroth one
- # as close removes item from array
+ while self.docs:
+ self.docs[0].close_presentation()
if os.name != u'nt':
desktop = self.get_uno_desktop()
else:
=== modified file 'openlp/plugins/presentations/lib/powerpointcontroller.py'
--- openlp/plugins/presentations/lib/powerpointcontroller.py 2010-03-23 19:41:54 +0000
+++ openlp/plugins/presentations/lib/powerpointcontroller.py 2010-03-23 21:55:24 +0000
@@ -82,9 +82,8 @@
Called at system exit to clean up any running presentations
"""
log.debug(u'Kill powerpoint')
- for i in range(len(self.docs)):
- self.docs[0].close_presentation() # Yes, always the zeroth one
- # as close removes item from array
+ while self.docs:
+ self.docs[0].close_presentation()
if self.process is None:
return
if self.process.Presentations.Count > 0:
=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py 2010-03-23 19:41:54 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py 2010-03-23 21:55:24 +0000
@@ -89,9 +89,8 @@
Called at system exit to clean up any running presentations
"""
log.debug(u'Kill pptviewer')
- for i in range(len(self.docs)):
- self.docs[0].close_presentation() # Yes, always the zeroth one
- # as close removes item from array
+ while self.docs:
+ self.docs[0].close_presentation()
def add_doc(self, name):
log.debug(u'Add Doc PPTView')
Follow ups