From 2dd196c2c7425a37560e89e2a0e61b2e27467b6f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 5 Aug 2022 20:43:37 +0200 Subject: Make use of cache to get binary paths --- libmat2/bubblewrap.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmat2/bubblewrap.py') diff --git a/libmat2/bubblewrap.py b/libmat2/bubblewrap.py index 970d5dd..1bb0f82 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: -- cgit v1.3