summaryrefslogtreecommitdiff
path: root/libmat2/bubblewrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmat2/bubblewrap.py')
-rw-r--r--libmat2/bubblewrap.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmat2/bubblewrap.py b/libmat2/bubblewrap.py
index 7a70635..8033d0a 100644
--- a/libmat2/bubblewrap.py
+++ b/libmat2/bubblewrap.py
@@ -22,10 +22,9 @@ CalledProcessError = subprocess.CalledProcessError
22 22
23 23
24def _get_bwrap_path() -> str: 24def _get_bwrap_path() -> str:
25 bwrap_path = '/usr/bin/bwrap' 25 which_path = shutil.which('bwrap')
26 if os.path.isfile(bwrap_path): 26 if which_path:
27 if os.access(bwrap_path, os.X_OK): 27 return which_path
28 return bwrap_path
29 28
30 raise RuntimeError("Unable to find bwrap") # pragma: no cover 29 raise RuntimeError("Unable to find bwrap") # pragma: no cover
31 30