From 412339835ebc015bcb9c01f2e7d9f4eafc914a8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 21 May 2021 15:02:23 +0200 Subject: [PATCH] man/check-os-release.py: strip trailing whitespace The shell parser would do that, so so should we. --- man/check-os-release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.47.3