diff --git a/code/src/healthstatus/mounts.py b/code/src/healthstatus/mounts.py index aa2b1427d..1b3aefc2c 100644 --- a/code/src/healthstatus/mounts.py +++ b/code/src/healthstatus/mounts.py @@ -205,7 +205,16 @@ def type(self) -> MountType: @contextmanager def mount_webdav(self, url: str) -> Iterator[None]: - raise NotImplementedError + log.debug("Mounting davfs2 mount ...") + subprocess.run( + ["sudo", "mount", "-t", "davfs", url, os.fspath(self.mount_path)], + check=True, + ) + try: + yield + finally: + log.debug("Unmounting davfs2 mount ...") + subprocess.run(["sudo", "umount", os.fspath(self.mount_path)], check=True) def iter_mounters(