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.
This commit is contained in:
Christian Kellner 2021-10-08 16:55:24 +00:00 committed by Tom Gundersen
parent 08c1fbad4b
commit f50146d3c5

View file

@ -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")