(Re #829) Fix for sudo_cmd not defined

This commit is contained in:
Sundar Raman 2012-08-09 18:02:21 -04:00
parent 9ad91d7369
commit 2f754f0284

View file

@ -101,7 +101,7 @@ class ParamikoConnection(object):
prompt = '[sudo via ansible, key=%s] password: ' % randbits
sudocmd = 'sudo -k && sudo -p "%s" -u %s -- "$SHELL" -c %s' % (
prompt, sudo_user, pipes.quote(cmd))
vvv("EXEC %s" % sudo_cmd, host=self.host)
vvv("EXEC %s" % sudocmd, host=self.host)
sudo_output = ''
try:
chan.exec_command(sudocmd)