From: Zbigniew Jędrzejewski-Szmek Date: Fri, 21 May 2021 13:02:23 +0000 (+0200) Subject: man/check-os-release.py: strip trailing whitespace X-Git-Tag: v249-rc1~173^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19686%2Fhead;p=thirdparty%2Fsystemd.git man/check-os-release.py: strip trailing whitespace The shell parser would do that, so so should we. --- diff --git a/man/check-os-release.py b/man/check-os-release.py index f6d23c8c463..069ca74b20e 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)