Skip to content
Snippets Groups Projects
Commit e219c78f authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI
Browse files

forall: Fix returning results early

rc should be returned only after all results are processed.

R=jojwang@google.com

Bug: b/376454189
Change-Id: I8200b9954240dd3e8e9f2ab82494779a3cb38627
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/440901


Tested-by: default avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: default avatarJoanna Wang <jojwang@google.com>
parent f9f4df62
No related branches found
No related tags found
No related merge requests found
......@@ -279,7 +279,7 @@ without iterating through the remaining projects.
rc = rc or r
if r != 0 and opt.abort_on_errors:
raise Exception("Aborting due to previous error")
return rc
return rc
try:
config = self.manifest.manifestProject.config
......@@ -298,7 +298,7 @@ without iterating through the remaining projects.
)
except (KeyboardInterrupt, WorkerKeyboardInterrupt):
# Catch KeyboardInterrupt raised inside and outside of workers
rc = rc or errno.EINTR
rc = errno.EINTR
except Exception as e:
# Catch any other exceptions raised
logger.error(
......@@ -306,7 +306,7 @@ without iterating through the remaining projects.
type(e).__name__,
e,
)
rc = rc or getattr(e, "errno", 1)
rc = getattr(e, "errno", 1)
if rc != 0:
sys.exit(rc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment