diff options
| author | Brolf | 2019-02-20 00:45:27 +0100 |
|---|---|---|
| committer | georg | 2019-03-05 23:13:42 +0000 |
| commit | 5ac91cd4f94a822c81bd0bc55a2f7034b31eee7a (patch) | |
| tree | b8e4e9ebb15757d5a6779eb5c224a6f98ba01ead /libmat2/exiftool.py | |
| parent | c3f097a82ba6fd8549aabc9c5427ab4e337fec0e (diff) | |
Refactor {black,white}list into {block,allow}list
Closes #96
Diffstat (limited to 'libmat2/exiftool.py')
| -rw-r--r-- | libmat2/exiftool.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmat2/exiftool.py b/libmat2/exiftool.py index db92f60..d18b1fb 100644 --- a/libmat2/exiftool.py +++ b/libmat2/exiftool.py | |||
| @@ -15,14 +15,14 @@ class ExiftoolParser(abstract.AbstractParser): | |||
| 15 | 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` |
| 16 | method. | 16 | method. |
| 17 | """ | 17 | """ |
| 18 | meta_whitelist = set() # type: Set[str] | 18 | meta_allowlist = set() # type: Set[str] |
| 19 | 19 | ||
| 20 | def get_meta(self) -> Dict[str, Union[str, dict]]: | 20 | def get_meta(self) -> Dict[str, Union[str, dict]]: |
| 21 | out = subprocess.run([_get_exiftool_path(), '-json', self.filename], | 21 | out = subprocess.run([_get_exiftool_path(), '-json', self.filename], |
| 22 | input_filename=self.filename, | 22 | input_filename=self.filename, |
| 23 | check=True, stdout=subprocess.PIPE).stdout | 23 | check=True, stdout=subprocess.PIPE).stdout |
| 24 | meta = json.loads(out.decode('utf-8'))[0] | 24 | meta = json.loads(out.decode('utf-8'))[0] |
| 25 | for key in self.meta_whitelist: | 25 | for key in self.meta_allowlist: |
| 26 | meta.pop(key, None) | 26 | meta.pop(key, None) |
| 27 | return meta | 27 | return meta |
| 28 | 28 | ||
