Fix pylint for #24874.

This commit is contained in:
dkiser 2015-06-22 14:21:22 -07:00
parent 8f66d193e0
commit bdcf7d88c1

View file

@ -1463,8 +1463,8 @@ 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_filename']
and SSH_PASSWORD_PROMP_SUDO_RE.search(stdout)
if ('key_filename' in kwargs and kwargs['key']
and SSH_PASSWORD_PROMP_SUDO_RE.search(stdout)
):
# do nothing, as command already has adjustments to
# echo out the sudo password as part of the ssh command