diff options
author | Aravind Vasudevan <aravindvasudev@google.com> | 2023-09-14 08:46:44 +0000 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-09-14 17:13:37 +0000 |
commit | c993c5068e0f7e22124b1bfb17ad0425fe2b8c83 (patch) | |
tree | 7e1dadd9b04a42ebfd438e41f35c176f0f0578da /subcmds/forall.py | |
parent | c3d7c8536c408a54c7af1486f0beec7a1b0eb0ad (diff) | |
download | git-repo-c993c5068e0f7e22124b1bfb17ad0425fe2b8c83.tar.gz |
subcmds: Use repo logger
Bug: b/292704435
Change-Id: Ia3a45d87fc0bf0d4a1ba53050d9c3cd2dba20e55
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/386236
Reviewed-by: Jason Chang <jasonnc@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Tested-by: Aravind Vasudevan <aravindvasudev@google.com>
Diffstat (limited to 'subcmds/forall.py')
-rw-r--r-- | subcmds/forall.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index 9a02c49f..287f2e04 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py | |||
@@ -28,8 +28,10 @@ from command import DEFAULT_LOCAL_JOBS | |||
28 | from command import MirrorSafeCommand | 28 | from command import MirrorSafeCommand |
29 | from command import WORKER_BATCH_SIZE | 29 | from command import WORKER_BATCH_SIZE |
30 | from error import ManifestInvalidRevisionError | 30 | from error import ManifestInvalidRevisionError |
31 | from repo_logging import RepoLogger | ||
31 | 32 | ||
32 | 33 | ||
34 | logger = RepoLogger(__file__) | ||
33 | _CAN_COLOR = [ | 35 | _CAN_COLOR = [ |
34 | "branch", | 36 | "branch", |
35 | "diff", | 37 | "diff", |
@@ -293,10 +295,10 @@ without iterating through the remaining projects. | |||
293 | rc = rc or errno.EINTR | 295 | rc = rc or errno.EINTR |
294 | except Exception as e: | 296 | except Exception as e: |
295 | # Catch any other exceptions raised | 297 | # Catch any other exceptions raised |
296 | print( | 298 | logger.error( |
297 | "forall: unhandled error, terminating the pool: %s: %s" | 299 | "forall: unhandled error, terminating the pool: %s: %s", |
298 | % (type(e).__name__, e), | 300 | type(e).__name__, |
299 | file=sys.stderr, | 301 | e, |
300 | ) | 302 | ) |
301 | rc = rc or getattr(e, "errno", 1) | 303 | rc = rc or getattr(e, "errno", 1) |
302 | if rc != 0: | 304 | if rc != 0: |