diff options
Diffstat (limited to 'src')
-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) |