[libcamera-devel] [PATCH] utils: ipc: mojom_libcamera_generator.py: Fix Python warning
Milan Zamazal
mzamazal at redhat.com
Fri Jan 5 14:16:21 CET 2024
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 <mzamazal at redhat.com>
---
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):
--
2.42.0
More information about the libcamera-devel
mailing list