Browse Source

[ Petter Reinholdtsen ]

* Make sure popanal do not crash when an invalid timestamp is found
     in the POPULARITY-CONTEST-0 header.
suites/ascii
Petter Reinholdtsen 14 years ago
parent
commit
c4c8eea047
  1. 8
      debian/changelog
  2. 7
      popanal.py

8
debian/changelog

@ -1,3 +1,11 @@
popularity-contest (1.44) UNRELEASED; urgency=low
[ Petter Reinholdtsen ]
* Make sure popanal do not crash when an invalid timestamp is found
in the POPULARITY-CONTEST-0 header.
-- Petter Reinholdtsen <pere@debian.org> Sun, 13 Jan 2008 14:32:32 +0100
popularity-contest (1.43) unstable; urgency=low
[ Christian Perrier ]

7
popanal.py

@ -198,7 +198,12 @@ def read_submissions(stream):
subcount = subcount + 1
ewrite('#%s' % subcount)
e = Submission(0, header['ID'], header['TIME'])
e = None
try:
e = Submission(0, header['ID'], header['TIME'])
except:
ewrite('Invalid date: ' + header['TIME'] + ' for ID ' + header['ID'])
continue
if header.has_key('POPCONVER'):
if header['POPCONVER']=='':

Loading…
Cancel
Save