changeset 5728:bbfe34d68e6c

googleimport: catch ValueError
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 20 Nov 2010 20:34:06 +0100
parents 17bcec43f773
children 4507be75514a
files contrib/googleimport/driver.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/googleimport/driver.py	Sat Nov 20 19:45:48 2010 +0100
+++ b/contrib/googleimport/driver.py	Sat Nov 20 20:34:06 2010 +0100
@@ -27,7 +27,6 @@
 class Task(object):
     def __init__(self, summary, desc, label, hours, mentors, difficulty, types):
         self.summary = summary
-        #self.desc = desc
         self.label = label
         self.hours = hours
         self.mentors = mentors
@@ -100,7 +99,7 @@
                 mentors = find_dict_entry("Mentors", page_contents)
                 difficulty = find_dict_entry("Difficulty", page_contents)
                 types = find_dict_entry("Type", page_contents)
-            except DataNotFoundException, e:
+            except (DataNotFoundException, ValueError), e:
                 print >>sys.stderr, "Could not import %r because of %r" % (page, e)
                 continue
             desc_m = re.search(desc_pattern, page_contents)