Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 194b1c85 authored by Bill Peckham's avatar Bill Peckham Committed by Gerrit Code Review
Browse files

Merge "Adding initial merge_target_files.py script to merge two target files packages."

parents f3c50438 e9eb5f96
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -190,6 +190,25 @@ def Run(args, verbose=None, **kwargs):
  return subprocess.Popen(args, **kwargs)


def RunAndWait(args, verbose=None, **kwargs):
  """Runs the given command and returns the exit code.

  Args:
    args: The command represented as a list of strings.
    verbose: Whether the commands should be shown. Default to the global
        verbosity if unspecified.
    kwargs: Any additional args to be passed to subprocess.Popen(), such as env,
        stdin, etc. stdout and stderr will default to subprocess.PIPE and
        subprocess.STDOUT respectively unless caller specifies any of them.

  Returns:
    The process return code.
  """
  proc = Run(args, verbose=verbose, **kwargs)
  proc.wait()
  return proc.returncode


def RunAndCheckOutput(args, verbose=None, **kwargs):
  """Runs the given command and returns the output.

+679 −0

File added.

Preview size limit exceeded, changes collapsed.