Changeset 1849

Show
Ignore:
Timestamp:
29/10/08 20:10:21 (2 months ago)
Author:
duncan
svm:headrev:

cc3e1ea1-1e01-0410-8d68-8b121e83a9d5:11130
Message:

[ 2183225 ] crashes on a RSS feed
Fix applied

Location:
freevo
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • freevo/ChangeLog

    r1848 r1849  
    2727 * Fixed automatic CD-ROM drive detection to ignore comments (B#2085387) 
    2828 * Fixed encoding idlebar to be able to select a font (B#2187603) 
     29 * Fixed headlines plug-in to ignore items without a title, etc. (B#2183225) 
    2930 * Fixed imdb helper to correctly handle dates when available (B#2075291) 
    3031 * Fixed joy plug-in to remove any pending events when enabled (B#1916407) 
  • freevo/src/plugins/headlines.py

    r1793 r1849  
    143143            if doc.status < 400: 
    144144                for entry in doc['entries']: 
    145                     title = Unicode(entry.title) 
    146                     link  = Unicode(entry.link) 
    147                     if entry.has_key('content') and len(entry['content']) >= 1: 
    148                         description = Unicode(entry['content'][0].value) 
    149                     else: 
    150                         description = Unicode(entry['summary_detail'].value) 
    151                     headlines.append((title, link, description)) 
     145                    try: 
     146                        title = Unicode(entry.title) 
     147                        link  = Unicode(entry.link) 
     148                        if entry.has_key('content') and len(entry['content']) >= 1: 
     149                            description = Unicode(entry['content'][0].value) 
     150                        else: 
     151                            description = Unicode(entry['summary_detail'].value) 
     152                        headlines.append((title, link, description)) 
     153                    except AttributeError: 
     154                        pass 
    152155            else: 
    153156                _debug_('Error %s, getting %r' % (doc.status, self.url))