From 6c31143b22e5366667ebb715a22a4edc7eb55efe Mon Sep 17 00:00:00 2001 From: dkiser Date: Mon, 22 Jun 2015 15:37:34 -0700 Subject: [PATCH] Fix key error for the PR to fix #24870. --- salt/utils/cloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py index 3879e2636c..3a11817987 100644 --- a/salt/utils/cloud.py +++ b/salt/utils/cloud.py @@ -1463,7 +1463,7 @@ def _exec_ssh_cmd(cmd, error_msg=None, allow_failure=False, **kwargs): if stdout and SSH_PASSWORD_PROMP_RE.search(stdout): # if authenticating with an SSH key and 'sudo' is found # in the password prompt - if ('key_filename' in kwargs and kwargs['key'] + if ('key_filename' in kwargs and kwargs['key_filename'] and SSH_PASSWORD_PROMP_SUDO_RE.search(stdout) ): # do nothing, as command already has adjustments to