Skip to content

Commit

Permalink
ignore unknown parsers. fix #160 (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpoul authored May 2, 2023
1 parent 920c9d7 commit a5a442a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions exifread/heic.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

class WrongBox(Exception):
pass
class NoParser(Exception):
pass
class BoxVersion(Exception):
pass
class BadSize(Exception):
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a5a442a

Please sign in to comment.