From 0b0f6245fabad93b249b5049a9df43d23665e151 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 27 Nov 2022 16:53:31 +0800 Subject: Fix check_ubuntu. --- tool/aio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tool/aio.py') diff --git a/tool/aio.py b/tool/aio.py index debcd68..cddd814 100755 --- a/tool/aio.py +++ b/tool/aio.py @@ -122,9 +122,9 @@ def check_ubuntu(): else: with open("/etc/os-release", "r") as f: content = f.read() - if re.match(r"NAME=\"?Ubuntu\"?", content, re.IGNORECASE) is None: + if re.search(r"NAME=\"?Ubuntu\"?", content, re.IGNORECASE) is None: return False - if re.match(r"UBUNTU_CODENAME=\"?jammy\"?", re.IGNORECASE) is None: + if re.search(r"VERSION_ID=\"?22.04\"?", content, re.IGNORECASE) is None: return False return True -- cgit v1.2.3