diff options
Diffstat (limited to 'libmat2/exiftool.py')
| -rw-r--r-- | libmat2/exiftool.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libmat2/exiftool.py b/libmat2/exiftool.py index 933ea63..cdfce3d 100644 --- a/libmat2/exiftool.py +++ b/libmat2/exiftool.py | |||
| @@ -4,23 +4,20 @@ import logging | |||
| 4 | import os | 4 | import os |
| 5 | import shutil | 5 | import shutil |
| 6 | import subprocess | 6 | import subprocess |
| 7 | from typing import Dict, Union, Set | 7 | from typing import Union |
| 8 | 8 | ||
| 9 | from . import abstract | 9 | from . import abstract |
| 10 | from . import bubblewrap | 10 | from . import bubblewrap |
| 11 | 11 | ||
| 12 | # Make pyflakes happy | ||
| 13 | assert Set | ||
| 14 | |||
| 15 | 12 | ||
| 16 | class ExiftoolParser(abstract.AbstractParser): | 13 | class ExiftoolParser(abstract.AbstractParser): |
| 17 | """ Exiftool is often the easiest way to get all the metadata | 14 | """ Exiftool is often the easiest way to get all the metadata |
| 18 | from a import file, hence why several parsers are re-using its `get_meta` | 15 | from a import file, hence why several parsers are re-using its `get_meta` |
| 19 | method. | 16 | method. |
| 20 | """ | 17 | """ |
| 21 | meta_allowlist = set() # type: Set[str] | 18 | meta_allowlist = set() # type: set[str] |
| 22 | 19 | ||
| 23 | def get_meta(self) -> Dict[str, Union[str, dict]]: | 20 | def get_meta(self) -> dict[str, Union[str, dict]]: |
| 24 | try: | 21 | try: |
| 25 | if self.sandbox: | 22 | if self.sandbox: |
| 26 | out = bubblewrap.run([_get_exiftool_path(), '-json', | 23 | out = bubblewrap.run([_get_exiftool_path(), '-json', |
