From 3d45b9ad9aefd4b1e702f89febe4aa6e6d3e2b9c Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Fri, 5 Jan 2024 14:16:21 +0100 Subject: utils: ipc: mojom_libcamera_generator.py: Fix Python warning Python 3.12 starts emitting the following warning when building libcamera: .../utils/ipc/generators/mojom_libcamera_generator.py:372: SyntaxWarning: invalid escape sequence '\.' if not re.match('^ipa\.[0-9A-Za-z_]+', namespace): `r' prefix is now required before the regexp. Signed-off-by: Milan Zamazal Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- utils/ipc/generators/mojom_libcamera_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py index 1a629f9d..582818c9 100644 --- a/utils/ipc/generators/mojom_libcamera_generator.py +++ b/utils/ipc/generators/mojom_libcamera_generator.py @@ -369,7 +369,7 @@ def ValidateNamespace(namespace): if namespace == '': raise Exception('Must have a namespace') - if not re.match('^ipa\.[0-9A-Za-z_]+', namespace): + if not re.match(r'^ipa\.[0-9A-Za-z_]+', namespace): raise Exception('Namespace must be of the form "ipa.{pipeline_name}"') def ValidateInterfaces(interfaces): -- cgit v1.2.1