Skip to content

Commit

Permalink
repo: Remove Python 2 compatibility code
Browse files Browse the repository at this point in the history
Change-Id: I1f5c691bf94f255442eea95e59ddd93db6213ad8
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/397758
Reviewed-by: Mike Frysinger <[email protected]>
Commit-Queue: Peter Kjellerstedt <[email protected]>
Tested-by: Peter Kjellerstedt <[email protected]>
  • Loading branch information
Peter Kjellerstedt authored and LUCI committed Dec 15, 2023
1 parent 14c61d2 commit aa506db
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions repo
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit aa506db

Please sign in to comment.