devtools/htmlparser.py
changeset 8941 7b26fe71404f
parent 8940 ae898a084da2
child 8951 5cfc0387d63f
equal deleted inserted replaced
8940:ae898a084da2 8941:7b26fe71404f
    37         try:
    37         try:
    38             return PageInfo(self, data)
    38             return PageInfo(self, data)
    39         except etree.XMLSyntaxError as exc:
    39         except etree.XMLSyntaxError as exc:
    40             def save_in(fname=''):
    40             def save_in(fname=''):
    41                 file(fname, 'w').write(data)
    41                 file(fname, 'w').write(data)
    42             new_exc = AssertionError(u'invalid xml %s' % exc)
    42             new_exc = AssertionError(u'invalid document: %s' % exc)
    43             new_exc.position = exc.position
    43             new_exc.position = exc.position
    44             raise new_exc
    44             raise new_exc
    45 
    45 
    46     def preprocess_data(self, data):
    46     def preprocess_data(self, data):
    47         return data
    47         return data