From 951e99231e539c11861d62ce9cfc5b186a3a3e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ja=C5=A1a?= Date: Tue, 23 Aug 2022 23:58:09 +0200 Subject: [PATCH] check-os-release.py compatible with Python < 3.8 The ":=" operator was only added in Python 3.8 so splitting the line with it into two makes check-os-release.py actually fulfill its claim of working with any python version. (cherry picked from commit ce0a056abc41168e1b45537505ca9f65bf6f5c30) --- man/check-os-release.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/check-os-release.py b/man/check-os-release.py index 91a5494b4a..1a57c7a20d 100644 --- a/man/check-os-release.py +++ b/man/check-os-release.py @@ -17,7 +17,8 @@ def read_os_release(): line = line.rstrip() if not line or line.startswith('#'): continue - if m := re.match(r'([A-Z][A-Z_0-9]+)=(.*)', line): + m = re.match(r'([A-Z][A-Z_0-9]+)=(.*)', line) + if m: name, val = m.groups() if val and val[0] in '"\'': val = ast.literal_eval(val)