fix for ticket #142

This commit is contained in:
Andreas Preikschat 2011-03-27 20:28:03 +02:00
parent 90236dedad
commit 26f144e1ec

View File

@ -406,24 +406,28 @@ class ServiceItem(object):
def get_rendered_frame(self, row):
"""
Returns the correct frame for a given list and
renders it if required.
Returns the correct frame for a given list and renders it if required.
"""
if self.service_item_type == ServiceItemType.Text:
return self._display_frames[row][u'html'].split(u'\n')[0]
elif self.service_item_type == ServiceItemType.Image:
return self._raw_frames[row][u'title']
else:
return self._raw_frames[row][u'image']
try:
if self.service_item_type == ServiceItemType.Text:
frame = self._display_frames[row][u'html'].split(u'\n')[0]
elif self.service_item_type == ServiceItemType.Image:
frame = self._raw_frames[row][u'title']
else:
frame = self._raw_frames[row][u'image']
except IndexError:
frame = u''
return frame
def get_frame_title(self, row=0):
"""
Returns the title of the raw frame
"""
try:
return self._raw_frames[row][u'title']
title = self._raw_frames[row][u'title']
except IndexError:
return u''
title = u''
return title
def get_frame_path(self, row=0):
"""