diff options
| author | Mike Frysinger <vapier@google.com> | 2020-02-25 15:09:01 -0500 |
|---|---|---|
| committer | Mike Frysinger <vapier@google.com> | 2020-02-25 23:31:47 +0000 |
| commit | 5f11eac1478fb4797766ca4f5225a7f60d9cb993 (patch) | |
| tree | e3707343a6314343dc711740f095922c599a1faf /subcmds/version.py | |
| parent | b0fbc7fb58af8ee1875993daad481b87bf8c2f94 (diff) | |
| download | git-repo-5f11eac1478fb4797766ca4f5225a7f60d9cb993.tar.gz | |
launcher/version: include OS/CPU info in output
We often ask users what OS/version they're running when debugging.
Include that in the version output to simplify the process.
Change-Id: Ie480b6d1c874e6f4c6f4996a03795077b844f858
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256732
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/version.py')
| -rw-r--r-- | subcmds/version.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/subcmds/version.py b/subcmds/version.py index 92316549..91dbe68f 100644 --- a/subcmds/version.py +++ b/subcmds/version.py | |||
| @@ -15,7 +15,10 @@ | |||
| 15 | # limitations under the License. | 15 | # limitations under the License. |
| 16 | 16 | ||
| 17 | from __future__ import print_function | 17 | from __future__ import print_function |
| 18 | |||
| 19 | import platform | ||
| 18 | import sys | 20 | import sys |
| 21 | |||
| 19 | from command import Command, MirrorSafeCommand | 22 | from command import Command, MirrorSafeCommand |
| 20 | from git_command import git, RepoSourceVersion, user_agent | 23 | from git_command import git, RepoSourceVersion, user_agent |
| 21 | from git_refs import HEAD | 24 | from git_refs import HEAD |
| @@ -52,3 +55,7 @@ class Version(Command, MirrorSafeCommand): | |||
| 52 | print('git %s' % git.version_tuple().full) | 55 | print('git %s' % git.version_tuple().full) |
| 53 | print('git User-Agent %s' % user_agent.git) | 56 | print('git User-Agent %s' % user_agent.git) |
| 54 | print('Python %s' % sys.version) | 57 | print('Python %s' % sys.version) |
| 58 | uname = platform.uname() | ||
| 59 | print('OS %s %s (%s)' % (uname.system, uname.release, uname.version)) | ||
| 60 | print('CPU %s (%s)' % | ||
| 61 | (uname.machine, uname.processor if uname.processor else 'unknown')) | ||
