diff options
author | Jason R. Coombs <jaraco@google.com> | 2023-09-29 11:04:49 -0400 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-10-31 16:03:54 +0000 |
commit | b32ccbb66bb16965ecb8b4e266c4e45186636c1b (patch) | |
tree | 1c1eda32af709f0cbf822de56f696ccd531ce6de /git_trace2_event_log_base.py | |
parent | b99272c601bc5f466c3cfc782bb852c2c967ad27 (diff) | |
download | git-repo-b32ccbb66bb16965ecb8b4e266c4e45186636c1b.tar.gz |
cleanup: Update codebase to expect Python 3.6
- Bump minimum version to Python 3.6.
- Use f-strings in a lot of places.
Change-Id: I2aa70197230fcec2eff8e7c8eb754f20c08075bb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389034
Tested-by: Jason R. Coombs <jaraco@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Jason R. Coombs <jaraco@google.com>
Diffstat (limited to 'git_trace2_event_log_base.py')
-rw-r--r-- | git_trace2_event_log_base.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/git_trace2_event_log_base.py b/git_trace2_event_log_base.py index 7b51b753..f5424249 100644 --- a/git_trace2_event_log_base.py +++ b/git_trace2_event_log_base.py | |||
@@ -76,9 +76,8 @@ class BaseEventLog: | |||
76 | # Save both our sid component and the complete sid. | 76 | # Save both our sid component and the complete sid. |
77 | # We use our sid component (self._sid) as the unique filename prefix and | 77 | # We use our sid component (self._sid) as the unique filename prefix and |
78 | # the full sid (self._full_sid) in the log itself. | 78 | # the full sid (self._full_sid) in the log itself. |
79 | self._sid = "repo-%s-P%08x" % ( | 79 | self._sid = ( |
80 | self.start.strftime("%Y%m%dT%H%M%SZ"), | 80 | f"repo-{self.start.strftime('%Y%m%dT%H%M%SZ')}-P{os.getpid():08x}" |
81 | os.getpid(), | ||
82 | ) | 81 | ) |
83 | 82 | ||
84 | if add_init_count: | 83 | if add_init_count: |