Skip to content

Commit a5a442a

Browse files
authored
ignore unknown parsers. fix #160 (#175)
1 parent 920c9d7 commit a5a442a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

exifread/heic.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
class WrongBox(Exception):
2222
pass
23-
class NoParser(Exception):
24-
pass
2523
class BoxVersion(Exception):
2624
pass
2725
class BadSize(Exception):
@@ -167,10 +165,7 @@ def get_parser(self, box: Box) -> Callable:
167165
'iinf': self._parse_iinf,
168166
'iloc': self._parse_iloc,
169167
}
170-
try:
171-
return defs[box.name]
172-
except (IndexError, KeyError) as err:
173-
raise NoParser(box.name) from err
168+
return defs.get(box.name)
174169

175170
def parse_box(self, box: Box) -> Box:
176171
probe = self.get_parser(box)

0 commit comments

Comments
 (0)