summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmat2/exiftool.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/libmat2/exiftool.py b/libmat2/exiftool.py
index 9611a04..adec28e 100644
--- a/libmat2/exiftool.py
+++ b/libmat2/exiftool.py
@@ -53,15 +53,14 @@ class ExiftoolParser(abstract.AbstractParser):
53 return True 53 return True
54 54
55def _get_exiftool_path() -> str: # pragma: no cover 55def _get_exiftool_path() -> str: # pragma: no cover
56 exiftool_path = '/usr/bin/exiftool' 56 possible_pathes = {
57 if os.path.isfile(exiftool_path): 57 '/usr/bin/exiftool', # debian/fedora
58 if os.access(exiftool_path, os.X_OK): 58 '/usr/bin/vendor_perl/exiftool', # archlinux
59 return exiftool_path 59 }
60 60
61 # ArchLinux 61 for possible_path in possible_pathes:
62 exiftool_path = '/usr/bin/vendor_perl/exiftool' 62 if os.path.isfile(possible_path):
63 if os.path.isfile(exiftool_path): 63 if os.access(possible_path, os.X_OK):
64 if os.access(exiftool_path, os.X_OK): 64 return possible_path
65 return exiftool_path
66 65
67 raise RuntimeError("Unable to find exiftool") 66 raise RuntimeError("Unable to find exiftool")