From 2ecf307e3279056640363e425b3089b237c3ed90 Mon Sep 17 00:00:00 2001 From: jvoisin <julien.voisin@dustri.org> Date: Sun, 15 Dec 2019 15:53:03 +0100 Subject: [PATCH] lol --- libmat2/exiftool.py | 2 +- libmat2/web.py | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/libmat2/exiftool.py b/libmat2/exiftool.py index a70b162..2d04841 100644 --- a/libmat2/exiftool.py +++ b/libmat2/exiftool.py @@ -30,7 +30,7 @@ class ExiftoolParser(abstract.AbstractParser): out = subprocess.run([_get_exiftool_path(), '-json', self.filename], check=True, stdout=subprocess.PIPE).stdout - except subprocess.CalledProcessError: + except subprocess.CalledProcessError: # pragma: no cover raise ValueError meta = json.loads(out.decode('utf-8'))[0] for key in self.meta_allowlist: diff --git a/libmat2/web.py b/libmat2/web.py index 18ef04f..b770200 100644 --- a/libmat2/web.py +++ b/libmat2/web.py @@ -96,15 +96,6 @@ class _HTMLParser(parser.HTMLParser): self.tag_required_blocklist = required_blocklisted_tags self.tag_blocklist = blocklisted_tags - def error(self, message): - """ Amusingly, Python's documentation doesn't mention that this - function needs to be implemented in subclasses of the parent class - of parser.HTMLParser. This was found by fuzzing, - triggering the following exception: - NotImplementedError: subclasses of ParserBase must override error() - """ - raise ValueError(message) - def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]): # Ignore the type, because mypy is too stupid to infer # that get_starttag_text() can't return None. -- GitLab