Commit 6debaf68 authored by jvoisin's avatar jvoisin

print

parent 15bedb88
Pipeline #22553 failed with stage
in 3 minutes and 1 second
......@@ -46,10 +46,10 @@ class _HTMLParser(parser.HTMLParser):
def handle_endtag(self, tag: str):
if not self.__validation_queue:
logging.error('MEH: %s' % self.__validation_queue)
print('MEH: %s' % self.__validation_queue)
raise ValueError
elif tag != self.__validation_queue.pop():
logging.error('POUET: %s' % self.__validation_queue)
print('POUET: %s' % self.__validation_queue)
raise ValueError
elif tag in self.tag_blacklist:
self.__in_dangerous_tag -= 1
......@@ -74,7 +74,7 @@ class _HTMLParser(parser.HTMLParser):
def remove_all(self, output_filename: str) -> bool:
if self.__validation_queue:
logging.error('Invalid: %s' % self.__validation_queue)
print('Invalid: %s' % self.__validation_queue)
raise ValueError
with open(output_filename, 'w') as f:
f.write(self.__textrepr)
......@@ -82,6 +82,6 @@ class _HTMLParser(parser.HTMLParser):
def get_meta(self) -> Dict[str, Any]:
if self.__validation_queue:
logging.error('Nope: %s' % self.__validation_queue)
print('Nope: %s' % self.__validation_queue)
raise ValueError
return self.__meta
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment