From a5a442a2e01cce58723a28a9ff0f31f2e8189aeb Mon Sep 17 00:00:00 2001 From: Herbert Poul Date: Wed, 3 May 2023 00:41:03 +0200 Subject: [PATCH] ignore unknown parsers. fix #160 (#175) --- exifread/heic.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/exifread/heic.py b/exifread/heic.py index 16a581ce..e7c663af 100644 --- a/exifread/heic.py +++ b/exifread/heic.py @@ -20,8 +20,6 @@ class WrongBox(Exception): pass -class NoParser(Exception): - pass class BoxVersion(Exception): pass class BadSize(Exception): @@ -167,10 +165,7 @@ def get_parser(self, box: Box) -> Callable: 'iinf': self._parse_iinf, 'iloc': self._parse_iloc, } - try: - return defs[box.name] - except (IndexError, KeyError) as err: - raise NoParser(box.name) from err + return defs.get(box.name) def parse_box(self, box: Box) -> Box: probe = self.get_parser(box)