Commit 32355cb2 authored by tguinot's avatar tguinot

Clean leftovers

parent d02f5921
......@@ -23,14 +23,9 @@ CalledProcessError = subprocess.CalledProcessError
def _get_bwrap_path() -> str:
which_path = shutil.which('bwrap')
if which_path is not None and os.access(which_path, os.X_OK):
if which_path is not None:
return which_path
bwrap_path = '/usr/bin/bwrap'
if os.path.isfile(bwrap_path):
if os.access(bwrap_path, os.X_OK):
return bwrap_path
raise RuntimeError("Unable to find bwrap") # pragma: no cover
......
......@@ -73,17 +73,7 @@ class ExiftoolParser(abstract.AbstractParser):
@functools.lru_cache()
def _get_exiftool_path() -> str: # pragma: no cover
which_path = shutil.which('exiftool')
if which_path is not None and os.access(which_path, os.X_OK):
if which_path is not None:
return which_path
possible_pathes = {
'/usr/bin/exiftool', # debian/fedora
'/usr/bin/vendor_perl/exiftool', # archlinux
}
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")
......@@ -139,12 +139,7 @@ class MP4Parser(AbstractFFmpegParser):
@functools.lru_cache()
def _get_ffmpeg_path() -> str: # pragma: no cover
which_path = shutil.which('ffmpeg')
if which_path is not None and os.access(which_path, os.X_OK):
if which_path is not None:
return which_path
ffmpeg_path = '/usr/bin/ffmpeg'
if os.path.isfile(ffmpeg_path):
if os.access(ffmpeg_path, os.X_OK):
return ffmpeg_path
raise RuntimeError("Unable to find ffmpeg")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment