nerdyator / feedjack

Automatically exported from code.google.com/p/feedjack
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

feedjack_update.py fails when updating a feed item with empty <pubDate> #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. feedjack_update.py failed with the problem below, when trying to update
http://www.securityfocus.com/rss/vulnerabilities.xml feed. 
This feed has some items with <pubDate> tag but the pubDate is empty.
You can use the feed above to reproduce the problem.

What is the expected output? What do you see instead?
The error is
['Traceback (most recent call last):\n', '  File
"/usr/lib/python2.5/site-packages/Feedjack-0.9.16-py2.5.egg/EGG-INFO/scripts/fee
djack_update.py",
line 313, in process\n    ret_entry = self.process_entry(entry,
postdict)\n', '  File
"/usr/lib/python2.5/site-packages/Feedjack-0.9.16-py2.5.egg/EGG-INFO/scripts/fee
djack_update.py",
line 217, in process_entry\n    ret_entry = entry.process()\n', '  File
"/usr/lib/python2.5/site-packages/Feedjack-0.9.16-py2.5.egg/EGG-INFO/scripts/fee
djack_update.py",
line 143, in process\n    fcat, comments) = self.get_entry_data()\n', ' 
File
"/usr/lib/python2.5/site-packages/Feedjack-0.9.16-py2.5.egg/EGG-INFO/scripts/fee
djack_update.py",
line 127, in get_entry_data\n    date_modified =
mtime(self.entry.modified_parsed)\n', '  File
"/usr/lib/python2.5/site-packages/Feedjack-0.9.16-py2.5.egg/EGG-INFO/scripts/fee
djack_update.py",
line 55, in mtime\n    return
datetime.datetime.fromtimestamp(time.mktime(ttime))\n', 'TypeError:
argument must be 9-item sequence, not None\n']

What version of the product are you using? On what operating system?
Feedjack-0.9.16 on Linux with Python 2.5 with Django 1.0 stable version.

Please provide any additional information below.

FIX
===
To fix this issue, I changed the 126th line as
if self.entry.has_key('modified_parsed') and self.entry.modified_parsed:

Best regards

Original issue reported on code.google.com by ser...@gmail.com on 23 Oct 2008 at 1:22

GoogleCodeExporter commented 8 years ago
Unfortunately I think the above fix does not seem to fix it. I'll trace the 
issue
when I'm available and post the details.

Original comment by ser...@gmail.com on 23 Oct 2008 at 1:46