Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mat2
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Brolf
mat2
Commits
5a9dc388
Commit
5a9dc388
authored
Oct 25, 2018
by
jvoisin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor refactorisation of how we're checking for exiftool's presence
parent
5a08f5b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
libmat2/exiftool.py
libmat2/exiftool.py
+8
-9
No files found.
libmat2/exiftool.py
View file @
5a9dc388
...
...
@@ -53,15 +53,14 @@ class ExiftoolParser(abstract.AbstractParser):
return
True
def
_get_exiftool_path
()
->
str
:
# pragma: no cover
exiftool_path
=
'/usr/bin/exiftool'
if
os
.
path
.
isfile
(
exiftool_path
):
if
os
.
access
(
exiftool_path
,
os
.
X_OK
):
return
exiftool_path
possible_pathes
=
{
'/usr/bin/exiftool'
,
# debian/fedora
'/usr/bin/vendor_perl/exiftool'
,
# archlinux
}
# ArchLinux
exiftool_path
=
'/usr/bin/vendor_perl/exiftool'
if
os
.
path
.
isfile
(
exiftool_path
):
if
os
.
access
(
exiftool_path
,
os
.
X_OK
):
return
exiftool_path
for
possible_path
in
possible_pathes
:
if
os
.
path
.
isfile
(
possible_path
):
if
os
.
access
(
possible_path
,
os
.
X_OK
):
return
possible_path
raise
RuntimeError
(
"Unable to find exiftool"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment