diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-02-28 09:47:28 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2022-02-28 10:52:17 +0100 |
commit | ee6fd6a50922d2b27c97084e1c3f9872d495c273 (patch) | |
tree | d8badefd1930a2a0166b270309b3768252c567e4 /man/check-os-release.py | |
parent | Merge pull request #22627 from yuwata/network-l2tp-cleanups (diff) | |
download | systemd-ee6fd6a50922d2b27c97084e1c3f9872d495c273.tar.xz systemd-ee6fd6a50922d2b27c97084e1c3f9872d495c273.zip |
man: recommend built-in platform.freedesktop_os_release() in our page
Python gained support for reading os-release, let's advertise it a bit more.
Our open-coded example is still useful, but let's not suggest it as the
default implementation.
I added quotes around the printed string because it looks a bit better
this way.
Diffstat (limited to 'man/check-os-release.py')
-rw-r--r-- | man/check-os-release.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/man/check-os-release.py b/man/check-os-release.py index dbac79fd70..91a5494b4a 100644 --- a/man/check-os-release.py +++ b/man/check-os-release.py @@ -29,7 +29,7 @@ def read_os_release(): os_release = dict(read_os_release()) pretty_name = os_release.get('PRETTY_NAME', 'Linux') -print(f'Running on {pretty_name}') +print(f'Running on {pretty_name!r}') if 'debian' in [os_release.get('ID', 'linux'), *os_release.get('ID_LIKE', '').split()]: |