diff --git a/roles/developer/build/files/rss.py b/roles/developer/build/files/rss.py index 294cad1f27..ce0f575594 100644 --- a/roles/developer/build/files/rss.py +++ b/roles/developer/build/files/rss.py @@ -36,14 +36,20 @@ for feed in map(feedparser.parse, FedMag):
""" cnt = 0 - # Getting at least 4 items in case of some python exceptions. + # Getting at least 6 items in case of some python exceptions. for item in feed["items"][:6]: if int(cnt) % 2 == 0: HTML += u"""
""" item.title = item.title.replace("&", "&") - author, title = item.title.split(':', 1) + # If a blog post doesn't have a title for some reason, it breaks the way + # we try to parse out the author and title. Let's say it's untitled in + # order for it to appear on the page without breaking the script. + if ":" in item.title: + author, title = item.title.split(':', 1) + else: + author, title = item.title, "(untitled post)" link = item.links[0]['href'] # Remove image tag from beginning try: