From aa506db8a76e224fadbeabb5b83661805c791bb2 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Fri, 3 Nov 2023 17:16:19 +0100 Subject: [PATCH] repo: Remove Python 2 compatibility code Change-Id: I1f5c691bf94f255442eea95e59ddd93db6213ad8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/397758 Reviewed-by: Mike Frysinger Commit-Queue: Peter Kjellerstedt Tested-by: Peter Kjellerstedt --- repo | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/repo b/repo index 91bcc5b2..908ad021 100755 --- a/repo +++ b/repo @@ -1363,13 +1363,9 @@ def _Version(): print(f"git {ParseGitVersion().full}") print(f"Python {sys.version}") uname = platform.uname() - if sys.version_info.major < 3: - # Python 3 returns a named tuple, but Python 2 is simpler. - print(uname) - else: - print(f"OS {uname.system} {uname.release} ({uname.version})") - processor = uname.processor if uname.processor else "unknown" - print(f"CPU {uname.machine} ({processor})") + print(f"OS {uname.system} {uname.release} ({uname.version})") + processor = uname.processor if uname.processor else "unknown" + print(f"CPU {uname.machine} ({processor})") print("Bug reports:", BUG_URL) sys.exit(0)