Bug 1147271 - Add ssh option to prevent hanging on password prompt in upload.py r=mshal

MozReview-Commit-ID: Lmg5SAtLuE3

--HG--
extra : rebase_source : 80f753be34759a366a6cf10847a546f9484d40ca
This commit is contained in:
Chris Manchester 2017-05-11 09:40:58 -07:00
parent 9c6cf33558
commit 756229ecd9

View File

@ -90,6 +90,8 @@ def AppendOptionalArgsToSSHCommandline(cmdline, port, ssh_key):
if not ssh_key.startswith('~'):
ssh_key = WindowsPathToMsysPath(ssh_key)
cmdline.extend(["-o", "IdentityFile=%s" % ssh_key])
# In case of an issue here we don't want to hang on a password prompt.
cmdline.extend(["-o", "BatchMode=yes"])
def DoSSHCommand(command, user, host, port=None, ssh_key=None):
"""Execute command on user@host using ssh. Optionally use