forked from openlp/openlp
- break loop, when service item has been found to be not valid
bzr-revno: 2207
This commit is contained in:
commit
8920e878fc
@ -636,14 +636,17 @@ class ServiceItem(object):
|
|||||||
for frame in self._raw_frames:
|
for frame in self._raw_frames:
|
||||||
if self.is_image() and not os.path.exists(frame[u'path']):
|
if self.is_image() and not os.path.exists(frame[u'path']):
|
||||||
self.is_valid = False
|
self.is_valid = False
|
||||||
|
break
|
||||||
elif self.is_command():
|
elif self.is_command():
|
||||||
file_name = os.path.join(frame[u'path'], frame[u'title'])
|
file_name = os.path.join(frame[u'path'], frame[u'title'])
|
||||||
if not os.path.exists(file_name):
|
if not os.path.exists(file_name):
|
||||||
self.is_valid = False
|
self.is_valid = False
|
||||||
|
break
|
||||||
if suffix_list and not self.is_text():
|
if suffix_list and not self.is_text():
|
||||||
file_suffix = frame[u'title'].split(u'.')[-1]
|
file_suffix = frame[u'title'].split(u'.')[-1]
|
||||||
if file_suffix.lower() not in suffix_list:
|
if file_suffix.lower() not in suffix_list:
|
||||||
self.is_valid = False
|
self.is_valid = False
|
||||||
|
break
|
||||||
|
|
||||||
def _get_renderer(self):
|
def _get_renderer(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user