[Popcon-commits] cvs commit to popularity-contest by pere
pere at cvs.alioth.debian.org
pere at cvs.alioth.debian.org
Tue Mar 18 08:32:32 UTC 2008
Update of /cvsroot/popcon/popularity-contest
In directory alioth:/tmp/cvs-serv9126
Modified Files:
popanal.py
Log Message:
[ Petter Reinholdtsen ]
* Make sure popanal do not crash when an invalid timestamp is found
in the POPULARITY-CONTEST-0 header.
Index: popanal.py
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popanal.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- popanal.py 19 Nov 2005 09:50:25 -0000 1.15
+++ popanal.py 18 Mar 2008 08:32:30 -0000 1.16
@@ -198,7 +198,12 @@
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']=='':
More information about the Popcon-commits
mailing list