Snap for 10872577 from 4123f306f792142e148708b99e0d6484e05d3a92 to 24Q1-release
Change-Id: I310094ff685686ece3a5d6623ca0edd2f02ee9e9
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 @@
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 @@
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())