[PATCH] tests/docker: avoid invalid escape in Python string

Paolo Bonzini posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231016062300.160160-1-pbonzini@redhat.com
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>
tests/docker/docker.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tests/docker: avoid invalid escape in Python string
Posted by Paolo Bonzini 1 year, 1 month ago
This is an error in Python 3.12; fix it by using a raw string literal.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/docker/docker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 688ef62989c..3b8a26704df 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -186,7 +186,7 @@ def _check_binfmt_misc(executable):
               (binary))
         return None, True
 
-    m = re.search("interpreter (\S+)\n", entry)
+    m = re.search(r"interpreter (\S+)\n", entry)
     interp = m.group(1)
     if interp and interp != executable:
         print("binfmt_misc for %s does not point to %s, using %s" %
-- 
2.41.0
Re: [PATCH] tests/docker: avoid invalid escape in Python string
Posted by Alex Bennée 1 year, 1 month ago
Paolo Bonzini <pbonzini@redhat.com> writes:

> This is an error in Python 3.12; fix it by using a raw string literal.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Queued to testing/next, thanks.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH] tests/docker: avoid invalid escape in Python string
Posted by Philippe Mathieu-Daudé 1 year, 1 month ago
On 16/10/23 08:23, Paolo Bonzini wrote:
> This is an error in Python 3.12; fix it by using a raw string literal.
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   tests/docker/docker.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH] tests/docker: avoid invalid escape in Python string
Posted by Manos Pitsidianakis 1 year, 1 month ago
On Mon, 16 Oct 2023 09:23, Paolo Bonzini <pbonzini@redhat.com> wrote:
>This is an error in Python 3.12; fix it by using a raw string literal.
>
>Cc: qemu-stable@nongnu.org
>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>---
> tests/docker/docker.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/tests/docker/docker.py b/tests/docker/docker.py
>index 688ef62989c..3b8a26704df 100755
>--- a/tests/docker/docker.py
>+++ b/tests/docker/docker.py
>@@ -186,7 +186,7 @@ def _check_binfmt_misc(executable):
>               (binary))
>         return None, True
> 
>-    m = re.search("interpreter (\S+)\n", entry)
>+    m = re.search(r"interpreter (\S+)\n", entry)
>     interp = m.group(1)
>     if interp and interp != executable:
>         print("binfmt_misc for %s does not point to %s, using %s" %
>-- 
>2.41.0
>
>

Reviewed-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>