ssh/remote: Improve error message if _control_path_dir is not set

This commit is contained in:
Jörg Thalheim
2025-05-27 11:58:45 +02:00
parent 2ef379b4df
commit 7b8b23b39b

View File

@@ -275,7 +275,7 @@ class Remote:
if self._control_path_dir is None and not control_master:
effective_control_path_dir = None
elif self._control_path_dir is None and control_master:
msg = "Control path directory is not set. Please with Remote.ssh_control_master() as ctx to set it."
msg = "Bug! Control path directory is not set. Please use Remote.ssh_control_master() or set control_master to false."
raise ClanError(msg)
ssh_opts = ["-A"] if self.forward_agent else []