Ticket #1572: feedgenerator.py.patch

File feedgenerator.py.patch, 1.1 KB (added by limodou@…, 18 years ago)
  • feedgenerator.py

     
    158158                handler.addQuickElement(u"description", item['description'])
    159159
    160160            # Author information.
    161             if item['author_email'] is not None and item['author_name'] is not None:
    162                 handler.addQuickElement(u"author", u"%s (%s)" % \
    163                     (item['author_email'], item['author_name']))
     161            if item['author_name'] and item['author_email']:
     162                handler.addQuickElement(u"author", "%s (%s)" % \
     163                    (item['author_name'], item['author_email']))
     164            elif item['author_name']:
     165                handler.addQuickElement(u"author", item['author_name'])
     166            elif item['author_email']:
     167                handler.addQuickElement(u"author", item['author_email'])
    164168
    165169            if item['pubdate'] is not None:
    166170                handler.addQuickElement(u"pubDate", rfc2822_date(item['pubdate']).decode('ascii'))
Back to Top