summary refs log tree commit diff stats
path: root/python
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-08-22 10:46:05 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-08-22 17:11:33 +0200
commitab85146ac4c6527d6d975afbd3157488cb42147f (patch)
treee2e3f3ec933c95450b366d87bc8807d8a9105023 /python
parentd84082cc1a7a7cac361094fc9b3165df7c697a01 (diff)
downloadfocaccia-qemu-ab85146ac4c6527d6d975afbd3157488cb42147f.tar.gz
focaccia-qemu-ab85146ac4c6527d6d975afbd3157488cb42147f.zip
python: mkvenv: fix messages printed by mkvenv
The new Matcher class does not have a __str__ implementation, and therefore
it prints the debugging representation of the internal object:

  $ ../configure --enable-rust && make qemu-system-arm --enable-download
  python determined to be '/usr/bin/python3'
  python version: Python 3.13.6
  mkvenv: Creating non-isolated virtual environment at 'pyvenv'
  mkvenv: checking for LegacyMatcher('meson>=1.5.0')
  mkvenv: checking for LegacyMatcher('pycotap>=1.1.0')

Add the method to print the nicer

  mkvenv: checking for meson>=1.5.0
  mkvenv: checking for pycotap>=1.1.0

Cc: qemu-stable@nongnu.org
Cc: John Snow <jsnow@redhat.com>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'python')
-rw-r--r--python/scripts/mkvenv.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py
index f102527c4d..9aed266df1 100644
--- a/python/scripts/mkvenv.py
+++ b/python/scripts/mkvenv.py
@@ -184,6 +184,10 @@ class Matcher:
             )
         )
 
+    def __str__(self) -> str:
+        """String representation delegated to the backend."""
+        return str(self._m)
+
     def __repr__(self) -> str:
         """Stable debug representation delegated to the backend."""
         return repr(self._m)