lib/webrtc-8d2248ff/tools/autoroller/roll_chromium_revision.py
def _RunCommand(command, working_dir=None, ignore_exit_code=False,
                extra_env=None):
  """Runs a command and returns the output from that command.

  If the command fails (exit code != 0), the function will exit the process.

  Returns:
    A tuple containing the stdout and stderr outputs as strings.
  """
  working_dir = working_dir or CHECKOUT_ROOT_DIR
  logging.debug('CMD: %s CWD: %s', ' '.join(command), working_dir)
  env = os.environ.copy()
  if extra_env:
    assert all(type(value) == str for value in extra_env.values())
    logging.debug('extra env: %s', extra_env)
    env.update(extra_env)
  p = subprocess.Popen(command, stdout=subprocess.PIPE,
                       stderr=subprocess.PIPE, env=env,
                       cwd=working_dir, universal_newlines=True)
  std_output = p.stdout.read()
  err_output = p.stderr.read()
  p.wait()
  p.stdout.close()
  p.stderr.close()
  if not ignore_exit_code and p.returncode != 0:
    logging.error('Command failed: %s\n'
                  'stdout:\n%s\n'
                  'stderr:\n%s\n', ' '.join(command), std_output, err_output)
    sys.exit(p.returncode)
  return std_output, err_output
Runs a command and returns the output from that command.

  If the command fails (exit code != 0), the function will exit the process.

  Returns:
    A tuple containing the stdout and stderr outputs as strings.
  
Runs a command and returns the output from that command.
If the command fails (exit code != 0), the function will exit the process.
Runs a command and returns the output from that command . If the command fails ( exit code ! = 0 ) the function will exit the process .
def _RunCommand(command, working_dir=None, ignore_exit_code=False,
                extra_env=None):
  working_dir = working_dir or CHECKOUT_ROOT_DIR
  logging.debug('CMD: %s CWD: %s', ' '.join(command), working_dir)
  env = os.environ.copy()
  if extra_env:
    assert all(type(value) == str for value in extra_env.values())
    logging.debug('extra env: %s', extra_env)
    env.update(extra_env)
  p = subprocess.Popen(command, stdout=subprocess.PIPE,
                       stderr=subprocess.PIPE, env=env,
                       cwd=working_dir, universal_newlines=True)
  std_output = p.stdout.read()
  err_output = p.stderr.read()
  p.wait()
  p.stdout.close()
  p.stderr.close()
  if not ignore_exit_code and p.returncode != 0:
    logging.error('Command failed: %s\n'
                  'stdout:\n%s\n'
                  'stderr:\n%s\n', ' '.join(command), std_output, err_output)
    sys.exit(p.returncode)
  return std_output, err_output
def _RunCommand ( command , working_dir = None , ignore_exit_code = False , extra_env = None ) : working_dir = working_dir or CHECKOUT_ROOT_DIR logging . debug ( 'CMD: %s CWD: %s' , ' ' . join ( command ) , working_dir ) env = os . environ . copy ( ) if extra_env : assert all ( type ( value ) == str for value in extra_env . values ( ) ) logging . debug ( 'extra env: %s' , extra_env ) env . update ( extra_env ) p = subprocess . Popen ( command , stdout = subprocess . PIPE , stderr = subprocess . PIPE , env = env , cwd = working_dir , universal_newlines = True ) std_output = p . stdout . read ( ) err_output = p . stderr . read ( ) p . wait ( ) p . stdout . close ( ) p . stderr . close ( ) if not ignore_exit_code and p . returncode != 0 : logging . error ( 'Command failed: %s\n' 'stdout:\n%s\n' 'stderr:\n%s\n' , ' ' . join ( command ) , std_output , err_output ) sys . exit ( p . returncode ) return std_output , err_output
Runs a command and returns the output from that command.
Runs a command and returns the output from that command .
"""Runs a command and returns the output from that command.

  If the command fails (exit code != 0), the function will exit the process.

  Returns:
    A tuple containing the stdout and stderr outputs as strings.
  """
A tuple containing the stdout and stderr outputs as strings.
A tuple containing the stdout and stderr outputs as strings .
command
working_dir
ignore_exit_code
extra_env