tools/perf/core/cli_helpers.py
def Run(command, ok_fail=False, **kwargs):
  """Prints and runs the command. Allows to ignore non-zero exit code."""
  if not isinstance(command, list):
    raise ValueError('command must be a list')
  print(Colored(' '.join(pipes.quote(c) for c in command), 'blue'))
  try:
    return subprocess.check_call(command, **kwargs)
  except subprocess.CalledProcessError as cpe:
    if not ok_fail:
      raise
    else:
      return cpe.returncode
Prints and runs the command. Allows to ignore non-zero exit code.
Prints and runs the command. Allows to ignore non-zero exit code.
Prints and runs the command . Allows to ignore non - zero exit code .
def Run(command, ok_fail=False, **kwargs):
  if not isinstance(command, list):
    raise ValueError('command must be a list')
  print(Colored(' '.join(pipes.quote(c) for c in command), 'blue'))
  try:
    return subprocess.check_call(command, **kwargs)
  except subprocess.CalledProcessError as cpe:
    if not ok_fail:
      raise
    else:
      return cpe.returncode
def Run ( command , ok_fail = False , ** kwargs ) : if not isinstance ( command , list ) : raise ValueError ( 'command must be a list' ) print ( Colored ( ' ' . join ( pipes . quote ( c ) for c in command ) , 'blue' ) ) try : return subprocess . check_call ( command , ** kwargs ) except subprocess . CalledProcessError as cpe : if not ok_fail : raise else : return cpe . returncode
Prints and runs the command.
Prints and runs the command .
"""Prints and runs the command. Allows to ignore non-zero exit code."""
command
ok_fail