diff options
Diffstat (limited to 'src/parser_factory.py')
| -rw-r--r-- | src/parser_factory.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/parser_factory.py b/src/parser_factory.py index 68e9e9c..80aedae 100644 --- a/src/parser_factory.py +++ b/src/parser_factory.py | |||
| @@ -30,5 +30,8 @@ def get_parser(filename: str) -> (T, str): | |||
| 30 | 30 | ||
| 31 | for c in _get_parsers(): | 31 | for c in _get_parsers(): |
| 32 | if mtype in c.mimetypes: | 32 | if mtype in c.mimetypes: |
| 33 | return c(filename), mtype | 33 | try: |
| 34 | return c(filename), mtype | ||
| 35 | except ValueError: | ||
| 36 | return None, mtype | ||
| 34 | return None, mtype | 37 | return None, mtype |
