diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-21 15:02:23 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-22 12:20:51 +0200 |
commit | 412339835ebc015bcb9c01f2e7d9f4eafc914a8e (patch) | |
tree | c15307386e9e8e0a1e45b39cefd287dd3efed279 /man/check-os-release.py | |
parent | man: say that initrd-release is like os-release (diff) | |
download | systemd-412339835ebc015bcb9c01f2e7d9f4eafc914a8e.tar.xz systemd-412339835ebc015bcb9c01f2e7d9f4eafc914a8e.zip |
man/check-os-release.py: strip trailing whitespace
The shell parser would do that, so so should we.
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 f6d23c8c46..069ca74b20 100644 --- a/man/check-os-release.py +++ b/man/check-os-release.py @@ -10,7 +10,7 @@ def read_os_release(): f = open('/usr/lib/os-release') for line_number, line in enumerate(f): - if m := re.match(r'([A-Z][A-Z_0-9]+)=(.*)', line): + if m := re.match(r'([A-Z][A-Z_0-9]+)=(.*?)\s*$', line): name, val = m.groups() if val and val[0] in '"\'': val = ast.literal_eval(val) |