diff options
author | Mike Frysinger <vapier@google.com> | 2023-09-27 20:47:41 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-09-27 20:47:41 +0000 |
commit | 4123f306f792142e148708b99e0d6484e05d3a92 (patch) | |
tree | 8f26ff335d180a6a5070cd0f348322205bf6472f | |
parent | de862e9a69938db3e0cff71335151faffe4df07b (diff) | |
parent | 99cf377b6de9b16e160fee796139d6f63d31b9ea (diff) | |
download | repohooks-4123f306f792142e148708b99e0d6484e05d3a92.tar.gz |
pre-upload: fix internal_failure setting am: 99cf377b6d
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2744953
Change-Id: Icc891c4b1a88baffc6a4aa5194033b41c0e66b09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rwxr-xr-x | pre-upload.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pre-upload.py b/pre-upload.py index 3eece2d..18bf11f 100755 --- a/pre-upload.py +++ b/pre-upload.py @@ -359,8 +359,7 @@ 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)) - ret.internal_failure = True - return ret + return ret._replace(internal_failure=True) # If the repo has no pre-upload hooks enabled, then just return. hooks = list(config.callable_hooks()) @@ -374,8 +373,7 @@ 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?') - ret.internal_failure = True - return ret + return ret._replace(internal_failure=True) project = rh.Project(name=project_name, dir=proj_dir) rel_proj_dir = os.path.relpath(proj_dir, rh.git.find_repo_root()) |