~ubuntu-dev/ubuntu/lucid/lazygal/lucid-201002101915

« back to all changes in this revision

Viewing changes to lazygal/feeds.py

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2008-07-06 22:54:38 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080706225438-50423dradliadtk2
Tags: 0.4-1
* New upstream version.
  - Fixes handling of comments with \0 (Closes: #485286).

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
                             time.localtime(timestamp))
78
78
 
79
79
    def __item_older(self, x, y):
80
 
        return y['timestamp'] - x['timestamp']
 
80
        return int(y['timestamp'] - x['timestamp'])
81
81
 
82
82
    def push_item(self, title, link, contents, timestamp):
83
83
        item = {}
96
96
 
97
97
        pubdate = ET.SubElement(channel, 'pubDate' )
98
98
 
99
 
        self.items.sort(lambda x,y: x['timestamp'] - y['timestamp'])
 
99
        self.items.sort(lambda x,y: int(x['timestamp'] - y['timestamp']))
100
100
        for item in self.items:
101
101
            rssitem = ET.SubElement(channel, 'item')
102
102
            ET.SubElement(rssitem, 'title').text = item['title']