From e4c5d59c6858270d67e59774709ac5eb3bf88c1a Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Wed, 21 May 2025 07:34:54 -0700 Subject: [PATCH] fix(test): resolve regex library warnings Use keyword args in re.sub to fix deprecation warnings Signed-off-by: Emmanuel Ferdman --- tests/host_tools/proc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/host_tools/proc.py b/tests/host_tools/proc.py index 2b81e536b3f..e4e2158ef8f 100644 --- a/tests/host_tools/proc.py +++ b/tests/host_tools/proc.py @@ -13,7 +13,7 @@ def proc_type(): lines = result.stdout.strip().splitlines() for line in lines: if "model name" in line: - return re.sub(".*model name.*:", "", line, 1) + return re.sub(".*model name.*:", "", line, count=1) cmd = "uname -m" result = utils.check_output(cmd).stdout.strip()