From 5fb9c6a5b35220e27b3acd5861318584588cd0d8 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Tue, 8 Nov 2022 00:54:56 +0000 Subject: v2.29.7: Revert back to v2.29.5 This change reverts stable to v2.29.5, to fix clients that received v2.29.6, and keep future updates simpler. Change-Id: I2f5c52c466b7321665c9699ccdbf98f928483fee --- project.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index 9d7476b4..1c85b044 100644 --- a/project.py +++ b/project.py @@ -41,7 +41,7 @@ from error import ManifestInvalidRevisionError, ManifestInvalidPathError from error import NoManifestException, ManifestParseError import platform_utils import progress -from repo_trace import Trace +from repo_trace import IsTrace, Trace from git_refs import GitRefs, HEAD, R_HEADS, R_TAGS, R_PUB, R_M, R_WORKTREE_M @@ -59,7 +59,7 @@ MAXIMUM_RETRY_SLEEP_SEC = 3600.0 # +-10% random jitter is added to each Fetches retry sleep duration. RETRY_JITTER_PERCENT = 0.1 -# Whether to use alternates. Switching back and forth is *NOT* supported. +# Whether to use alternates. # TODO(vapier): Remove knob once behavior is verified. _ALTERNATES = os.environ.get('REPO_USE_ALTERNATES') == '1' @@ -2416,16 +2416,16 @@ class Project(object): srcUrl = 'http' + srcUrl[len('persistent-http'):] cmd += [srcUrl] - proc = None - with Trace('Fetching bundle: %s', ' '.join(cmd)): - if verbose: - print('%s: Downloading bundle: %s' % (self.name, srcUrl)) - stdout = None if verbose else subprocess.PIPE - stderr = None if verbose else subprocess.STDOUT - try: - proc = subprocess.Popen(cmd, stdout=stdout, stderr=stderr) - except OSError: - return False + if IsTrace(): + Trace('%s', ' '.join(cmd)) + if verbose: + print('%s: Downloading bundle: %s' % (self.name, srcUrl)) + stdout = None if verbose else subprocess.PIPE + stderr = None if verbose else subprocess.STDOUT + try: + proc = subprocess.Popen(cmd, stdout=stdout, stderr=stderr) + except OSError: + return False (output, _) = proc.communicate() curlret = proc.returncode -- cgit v1.2.3-54-g00ecf