1
0
mirror of synced 2024-11-22 01:04:23 +01:00

Make use of cache to get binary paths

This commit is contained in:
jvoisin 2022-08-05 20:43:37 +02:00
parent 34eb878aae
commit 2dd196c2c7
2 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import os
import shutil
import subprocess
import tempfile
import functools
from typing import List, Optional
@ -21,6 +22,7 @@ CalledProcessError = subprocess.CalledProcessError
# pylint: disable=subprocess-run-check
@functools.lru_cache
def _get_bwrap_path() -> str:
which_path = shutil.which('bwrap')
if which_path:

View File

@ -70,7 +70,7 @@ class ExiftoolParser(abstract.AbstractParser):
return False
return True
@functools.lru_cache()
@functools.lru_cache
def _get_exiftool_path() -> str: # pragma: no cover
which_path = shutil.which('exiftool')
if which_path: