From a6c52f566acfbff5b0f37158c0d33adf05d250e5 Mon Sep 17 00:00:00 2001 From: Joanna Wang Date: Thu, 3 Nov 2022 16:51:19 -0400 Subject: Set tracing to always on and save to .repo/TRACE_FILE. - add `--trace_to_stderr` option so stderr will include trace outputs and any other errors that get sent to stderr - while TRACE_FILE will only include trace outputs piggy-backing on: https://gerrit-review.googlesource.com/c/git-repo/+/349154 Change-Id: I3895a84de4b2784f17fac4325521cd5e72e645e2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/350114 Reviewed-by: LaMont Jones Tested-by: Joanna Wang --- git_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git_config.py') diff --git a/git_config.py b/git_config.py index 6f80ae08..98cade32 100644 --- a/git_config.py +++ b/git_config.py @@ -349,9 +349,9 @@ class GitConfig(object): except OSError: return None try: - Trace(': parsing %s', self.file) - with open(self._json) as fd: - return json.load(fd) + with Trace(': parsing %s', self.file): + with open(self._json) as fd: + return json.load(fd) except (IOError, ValueError): platform_utils.remove(self._json, missing_ok=True) return None -- cgit v1.2.3-54-g00ecf