From cd25e0fba0c91af61a4161b7bb55570e28586bdb Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 19 Apr 2015 00:06:50 -0400 Subject: [PATCH] Fix C.ANSIBLE_SSH_CONTROL_PATH string interpolation Since C.ANSIBLE_SSH_CONTROL_PATH use the old format ( "%{directory}" ), we need to use the % operator and not the format method, at least for python 2. --- v2/ansible/plugins/connections/ssh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/ansible/plugins/connections/ssh.py b/v2/ansible/plugins/connections/ssh.py index c07582f6b7..1d54d3ba48 100644 --- a/v2/ansible/plugins/connections/ssh.py +++ b/v2/ansible/plugins/connections/ssh.py @@ -74,7 +74,7 @@ class Connection(ConnectionBase): self._common_args += ( "-o", "ControlMaster=auto", "-o", "ControlPersist=60s", - "-o", "ControlPath=\"{0}\"".format(C.ANSIBLE_SSH_CONTROL_PATH.format(dict(directory=self._cp_dir))), + "-o", "ControlPath=\"{0}\"".format(C.ANSIBLE_SSH_CONTROL_PATH % dict(directory=self._cp_dir)), ) cp_in_use = False @@ -87,7 +87,7 @@ class Connection(ConnectionBase): if cp_in_use and not cp_path_set: self._common_args += ("-o", "ControlPath=\"{0}\"".format( - C.ANSIBLE_SSH_CONTROL_PATH.format(dict(directory=self._cp_dir))) + C.ANSIBLE_SSH_CONTROL_PATH % dict(directory=self._cp_dir)) ) if not C.HOST_KEY_CHECKING: