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 <mzamazal@redhat.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Milan Zamazal 2024-01-05 14:16:21 +01:00 committed by Kieran Bingham
parent 90fa9a0f2b
commit 3d45b9ad9a

View file

@ -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):