Make use of cache to get binary paths
This commit is contained in:
parent
34eb878aae
commit
2dd196c2c7
@ -11,6 +11,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import functools
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
|
|
||||||
@ -21,6 +22,7 @@ CalledProcessError = subprocess.CalledProcessError
|
|||||||
# pylint: disable=subprocess-run-check
|
# pylint: disable=subprocess-run-check
|
||||||
|
|
||||||
|
|
||||||
|
@functools.lru_cache
|
||||||
def _get_bwrap_path() -> str:
|
def _get_bwrap_path() -> str:
|
||||||
which_path = shutil.which('bwrap')
|
which_path = shutil.which('bwrap')
|
||||||
if which_path:
|
if which_path:
|
||||||
|
@ -70,7 +70,7 @@ class ExiftoolParser(abstract.AbstractParser):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@functools.lru_cache()
|
@functools.lru_cache
|
||||||
def _get_exiftool_path() -> str: # pragma: no cover
|
def _get_exiftool_path() -> str: # pragma: no cover
|
||||||
which_path = shutil.which('exiftool')
|
which_path = shutil.which('exiftool')
|
||||||
if which_path:
|
if which_path:
|
||||||
|
Loading…
Reference in New Issue
Block a user