Fixed bug that occours when description is missing in subject

This commit is contained in:
Stefan Ritter 2009-10-28 14:22:58 +01:00
parent 900fe4e36a
commit d4966fabe4

View file

@ -55,7 +55,11 @@ for line in url:
if options.description:
description = line.strip()
description = ' (' + re.sub('</a>,', '', re.sub('(.*):(.*):', '', description))[:50].strip() + '...)'
try:
description = re.sub('</a>,', '', description)
description = ' (' + description.split(':')[2] + ')'
except:
description = ''
item.append(description)
else:
item.append('')