diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-15 14:12:54 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-15 14:12:54 +0000 |
commit | 0d4905220637bb3c49161d07834da4fa11d8af2c (patch) | |
tree | 608463162fa14a2cb7e48fe172d064296fe135a3 | |
parent | c6886c251fa3f65aa1cddb533c6121c2eb7c4ed6 (diff) | |
parent | 8f1e572f90aea0b67bf2858dac4c0c3f29461921 (diff) | |
download | buildstream-0d4905220637bb3c49161d07834da4fa11d8af2c.tar.gz |
Merge branch 'chandan/fix-fuse-check' into 'master'
sandbox/_sandboxbwrap.py: Fix fuse import issue
Closes #1081
See merge request BuildStream/buildstream!1475
-rw-r--r-- | src/buildstream/sandbox/_sandboxbwrap.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/buildstream/sandbox/_sandboxbwrap.py b/src/buildstream/sandbox/_sandboxbwrap.py index 17f999ac0..1155793c6 100644 --- a/src/buildstream/sandbox/_sandboxbwrap.py +++ b/src/buildstream/sandbox/_sandboxbwrap.py @@ -36,7 +36,6 @@ import psutil from .._exceptions import SandboxError from .. import utils, _signals -from ._mount import MountMap from . import Sandbox, SandboxFlags from .. import _site @@ -147,6 +146,12 @@ class SandboxBwrap(Sandbox): "'{}'".format(command[0]), reason='missing-command') + # NOTE: MountMap transitively imports `_fuse/fuse.py` which raises an + # EnvironmentError when fuse is not found. Since this module is + # expected to be imported even in absence of fuse, MountMap is imported + # here, and not at the top of the module. + from ._mount import MountMap + # Create the mount map, this will tell us where # each mount point needs to be mounted from and to mount_map = MountMap(self, flags & SandboxFlags.ROOT_READ_ONLY) |