From 7e4f6d1841d07ab69bc74233a256b3ca3ffbb33e Mon Sep 17 00:00:00 2001 From: Android Open Source Project Date: Thu, 27 Mar 2025 15:17:57 -0700 Subject: [PATCH] repo: Update from upstream - 243df2042ed756e7829cd39d3ebe3d1919444d5d launcher: change RunResult to subprocess.CompletedProcess by Mike Frysinger GitOrigin-RevId: 243df2042ed756e7829cd39d3ebe3d1919444d5d Change-Id: I2c607922216ee35f8555c023b25e6e9e37a6d9c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6405593 Auto-Submit: Mike Frysinger Commit-Queue: Gavin Mak Reviewed-by: Gavin Mak --- repo_launcher | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/repo_launcher b/repo_launcher index 85825e8042..d9e28ab07a 100755 --- a/repo_launcher +++ b/repo_launcher @@ -124,7 +124,7 @@ if not REPO_REV: BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071" # increment this whenever we make important changes to this script -VERSION = (2, 50) +VERSION = (2, 54) # increment this if the MAINTAINER_KEYS block is modified KEYRING_VERSION = (2, 3) @@ -483,11 +483,6 @@ def InitParser(parser): # This is a poor replacement for subprocess.run until we require Python 3.6+. -RunResult = collections.namedtuple( - "RunResult", ("returncode", "stdout", "stderr") -) - - class RunError(Exception): """Error when running a command failed.""" @@ -526,7 +521,9 @@ def run_command(cmd, **kwargs): elif stderr == subprocess.STDOUT: dbg += " 2>&1" trace.print(dbg) - ret = RunResult(proc.returncode, decode(stdout), decode(stderr)) + ret = subprocess.CompletedProcess( + cmd, proc.returncode, decode(stdout), decode(stderr) + ) # If things failed, print useful debugging output. if check and ret.returncode: @@ -553,7 +550,6 @@ def run_command(cmd, **kwargs): class CloneFailure(Exception): - """Indicate the remote clone of repo itself failed."""