From 87f0f64fe770ddd91a116af5167563c1fb88952d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 24 Mar 2025 16:55:43 +0100 Subject: [PATCH] Fix invalid escape sequence errors in cls_module.py As parent. The second change has no escape sequence, but since it's also a regex, mark it as raw for uniformity (it doesn't hurt either). ci-scripts/cls_module.py:165: SyntaxWarning: invalid escape sequence '\.' result = re.search('inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout) --- ci-scripts/cls_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/cls_module.py b/ci-scripts/cls_module.py index 4eadddf686..3ec6ffc9e5 100644 --- a/ci-scripts/cls_module.py +++ b/ci-scripts/cls_module.py @@ -162,7 +162,7 @@ class Module_UE: def getIP(self): output = self._command(self.cmd_dict["getNetwork"], silent=True) - result = re.search('inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout) + result = re.search(r'inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout) if result and result.group('ip'): ip = result.group('ip') return ip @@ -170,7 +170,7 @@ class Module_UE: def checkMTU(self): output = self._command(self.cmd_dict["getNetwork"], silent=True) - result = re.search('mtu (?P[0-9]+)', output.stdout) + result = re.search(r'mtu (?P[0-9]+)', output.stdout) if result and result.group('mtu') and int(result.group('mtu')) == self.MTU: logging.debug(f'\u001B[1mUE Module {self.module_name} NIC MTU is {self.MTU} as expected\u001B[0m') return True