← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/service-manager into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/service-manager into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol/openlp/service-manager/+merge/153136

Hello,

- break loop, when service item has been found to be not valid
-- 
https://code.launchpad.net/~googol/openlp/service-manager/+merge/153136
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/service-manager into lp:openlp.
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2013-03-06 22:23:01 +0000
+++ openlp/core/lib/serviceitem.py	2013-03-13 13:48:21 +0000
@@ -636,14 +636,17 @@
         for frame in self._raw_frames:
             if self.is_image() and not os.path.exists(frame[u'path']):
                 self.is_valid = False
+                break
             elif self.is_command():
                 file_name = os.path.join(frame[u'path'], frame[u'title'])
                 if not os.path.exists(file_name):
                     self.is_valid = False
+                    break
                 if suffix_list and not self.is_text():
                     file_suffix = frame[u'title'].split(u'.')[-1]
                     if file_suffix.lower() not in suffix_list:
                         self.is_valid = False
+                        break
 
     def _get_renderer(self):
         """


Follow ups