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>
This commit is contained in:
parent
c3d7c8536c
commit
c993c5068e
12 changed files with 121 additions and 115 deletions
|
@ -28,8 +28,10 @@ from command import DEFAULT_LOCAL_JOBS
|
|||
from command import MirrorSafeCommand
|
||||
from command import WORKER_BATCH_SIZE
|
||||
from error import ManifestInvalidRevisionError
|
||||
from repo_logging import RepoLogger
|
||||
|
||||
|
||||
logger = RepoLogger(__file__)
|
||||
_CAN_COLOR = [
|
||||
"branch",
|
||||
"diff",
|
||||
|
@ -293,10 +295,10 @@ without iterating through the remaining projects.
|
|||
rc = rc or errno.EINTR
|
||||
except Exception as e:
|
||||
# Catch any other exceptions raised
|
||||
print(
|
||||
"forall: unhandled error, terminating the pool: %s: %s"
|
||||
% (type(e).__name__, e),
|
||||
file=sys.stderr,
|
||||
logger.error(
|
||||
"forall: unhandled error, terminating the pool: %s: %s",
|
||||
type(e).__name__,
|
||||
e,
|
||||
)
|
||||
rc = rc or getattr(e, "errno", 1)
|
||||
if rc != 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue