diff --git a/libmat2/bubblewrap.py b/libmat2/bubblewrap.py index 970d5dd7dd0a567e9ce9ea4927fa3f321e65178e..1bb0f82997e1d9e224c1e7e198ca5b5390654351 100644 --- a/libmat2/bubblewrap.py +++ b/libmat2/bubblewrap.py @@ -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: diff --git a/libmat2/exiftool.py b/libmat2/exiftool.py index eb65b2a25ce244b3009c976dd33f19b3a0275bab..933ea639227cdd01ee937bea083ec3a4f6c5a691 100644 --- a/libmat2/exiftool.py +++ b/libmat2/exiftool.py @@ -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: