Exemple #1
0
 def validate_hansard(self, src):
     try:
         head, entries = parse(open(src, 'rU').read())
         if self.validate_header(head):
             print head
             if self.validate_entries(entries):
                 print '%s is OK' % src
             else:
                 print 'Bad entry found in: %s' % src
         else:
             print 'Bad header found in: %s' % src
     except Exception, e:
         print 'Error validating hansard: %s' % src
         traceback.print_exc()
Exemple #2
0
 def validate_hansard(self, src):
     try:
         head, entries = parse(open(src, 'rU').read())
         if self.validate_header(head):
             print head
             if self.validate_entries(entries):
                 print '%s is OK' % src
             else:
                 print 'Bad entry found in: %s' % src
         else:
             print 'Bad header found in: %s' % src
     except Exception, e:
         print 'Error validating hansard: %s' % src
         traceback.print_exc()
Exemple #3
0
 def add_hansard(self, src):
     try:
         data.add_hansard(*parse(open(src, "r").read()))
     except Exception, e:
         print "Error adding hansard: %s" % src
         print e
Exemple #4
0
 def add_hansard(self, src):
     try:
         data.add_hansard(*parse(open(src, 'r').read()))
     except Exception, e:
         print 'Error adding hansard: %s' % src
         print e