diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2023-10-20 23:32:02 +0545 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-10-21 00:55:33 +0000 |
commit | 034950b9eebacd6598ea518a0b254845bc806ab6 (patch) | |
tree | b035f894f27e7f37118578a0ebcfca5fcfb7ff59 /repo_trace.py | |
parent | 0bcffd865616a0a14b7e9f2b03d77da2444d3025 (diff) | |
download | git-repo-034950b9eebacd6598ea518a0b254845bc806ab6.tar.gz |
cleanup: delete redundant "r" open mode
Change-Id: I86ebb8c5a9dc3752e8a25f4b11b64c5be3a6429e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/390375
Tested-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Diffstat (limited to 'repo_trace.py')
-rw-r--r-- | repo_trace.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/repo_trace.py b/repo_trace.py index d243ce6c..ee224ea7 100644 --- a/repo_trace.py +++ b/repo_trace.py | |||
@@ -142,7 +142,7 @@ def _GetTraceFile(quiet): | |||
142 | def _ClearOldTraces(): | 142 | def _ClearOldTraces(): |
143 | """Clear the oldest commands if trace file is too big.""" | 143 | """Clear the oldest commands if trace file is too big.""" |
144 | try: | 144 | try: |
145 | with open(_TRACE_FILE, "r", errors="ignore") as f: | 145 | with open(_TRACE_FILE, errors="ignore") as f: |
146 | if os.path.getsize(f.name) / (1024 * 1024) <= _MAX_SIZE: | 146 | if os.path.getsize(f.name) / (1024 * 1024) <= _MAX_SIZE: |
147 | return | 147 | return |
148 | trace_lines = f.readlines() | 148 | trace_lines = f.readlines() |