Revision 710bc88c qa/qa_utils.py

b/qa/qa_utils.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2007, 2011 Google Inc.
4
# Copyright (C) 2007, 2011, 2012 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
207 207
  @param tty: if we should use tty; if None, will be auto-detected
208 208

  
209 209
  """
210
  args = ["ssh", "-oEscapeChar=none", "-oBatchMode=yes", "-l", "root"]
210
  args = ["ssh", "-oEscapeChar=none", "-oBatchMode=yes", "-lroot"]
211 211

  
212 212
  if tty is None:
213 213
    tty = sys.stdout.isatty()
......
235 235
  return args
236 236

  
237 237

  
238
def StartLocalCommand(cmd, **kwargs):
238
def StartLocalCommand(cmd, _nolog_opts=False, **kwargs):
239 239
  """Starts a local command.
240 240

  
241 241
  """
242
  print "Command: %s" % utils.ShellQuoteArgs(cmd)
242
  if _nolog_opts:
243
    pcmd = [i for i in cmd if not i.startswith("-")]
244
  else:
245
    pcmd = cmd
246
  print "Command: %s" % utils.ShellQuoteArgs(pcmd)
243 247
  return subprocess.Popen(cmd, shell=False, **kwargs)
244 248

  
245 249

  
......
247 251
  """Starts SSH.
248 252

  
249 253
  """
250
  return StartLocalCommand(GetSSHCommand(node, cmd, strict=strict))
254
  return StartLocalCommand(GetSSHCommand(node, cmd, strict=strict),
255
                           _nolog_opts=True)
251 256

  
252 257

  
253 258
def StartMultiplexer(node):

Also available in: Unified diff