From f50146d3c507fca72048162b58cdb625ae106c14 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 8 Oct 2021 16:55:24 +0000 Subject: [PATCH] mounts: allow empty returns from service Allow mount services to return None, which means they have not actually mounted anything within the mount root. This might be because they have bind mounted directories within the tree. These mounts do not need any path translation. --- osbuild/mounts.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osbuild/mounts.py b/osbuild/mounts.py index ec8d5a02..2b905294 100644 --- a/osbuild/mounts.py +++ b/osbuild/mounts.py @@ -74,6 +74,11 @@ class MountManager: client = mgr.start(f"mount/{mount.name}", mount.info.path) path = client.call("mount", args) + if not path: + res = {} + self.mounts[mount.name] = res + return res + if not path.startswith(self.root): raise RuntimeError(f"returned path '{path}' has wrong prefix")