aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-07 22:04:11 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-07 22:04:11 +0000
commit171b207b960b76a875105b5b74db3e2c9b4ccdf6 (patch)
tree58727dc07d0dacf16eef568fc5d0cbaf9c9418a4
parente753292723a1c1d2c086d67739f0670785e3e921 (diff)
parent904ef5628355fefe262ea1cfc262cca2193bc120 (diff)
downloadrepohooks-171b207b960b76a875105b5b74db3e2c9b4ccdf6.tar.gz
Snap for 10763390 from 904ef5628355fefe262ea1cfc262cca2193bc120 to androidx-benchmark-releaseandroidx-benchmark-release
Change-Id: I64779794c61fd29d591612a5316fc051a678ebe6
-rwxr-xr-xpre-upload.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pre-upload.py b/pre-upload.py
index 18bf11f..3eece2d 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -359,7 +359,8 @@ def _run_project_hooks_in_cwd(
config = _get_project_config(from_git)
except rh.config.ValidationError as e:
output.error('Loading config files', str(e))
- return ret._replace(internal_failure=True)
+ ret.internal_failure = True
+ return ret
# If the repo has no pre-upload hooks enabled, then just return.
hooks = list(config.callable_hooks())
@@ -373,7 +374,8 @@ def _run_project_hooks_in_cwd(
except rh.utils.CalledProcessError as e:
output.error('Upstream remote/tracking branch lookup',
f'{e}\nDid you run repo start? Is your HEAD detached?')
- return ret._replace(internal_failure=True)
+ ret.internal_failure = True
+ return ret
project = rh.Project(name=project_name, dir=proj_dir)
rel_proj_dir = os.path.relpath(proj_dir, rh.git.find_repo_root())