[Collab-qa-commits] r1798 - udd/udd

Lucas Nussbaum lucas at alioth.debian.org
Fri Sep 17 20:16:00 UTC 2010


Author: lucas
Date: 2010-09-17 20:15:45 +0000 (Fri, 17 Sep 2010)
New Revision: 1798

Modified:
   udd/udd/dehs_gatherer.py
Log:
handle wrong input safely

Modified: udd/udd/dehs_gatherer.py
===================================================================
--- udd/udd/dehs_gatherer.py	2010-09-17 20:14:41 UTC (rev 1797)
+++ udd/udd/dehs_gatherer.py	2010-09-17 20:15:45 UTC (rev 1798)
@@ -49,7 +49,11 @@
     for line in file(my_config['path']):
       line_number += 1
 
-      src, uu, eu, uv, ev, upv, epv, u_utd, e_utd, uf, ef, udate, edate = line.rstrip().split('|')
+      try:
+        src, uu, eu, uv, ev, upv, epv, u_utd, e_utd, uf, ef, udate, edate = line.rstrip().split('|')
+      except ValueError:
+         print "Error reading "+line
+         continue
       if udate == "":
         udate = None
       if edate == "":




More information about the Collab-qa-commits mailing list