423edd9a31
drop "from __future__ import print_function"
...
This is only needed for Python 2, which we do not support anymore.
Cc: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Alex Bennée <alex.bennee@linaro.org >
Acked-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20200204160604.19883-1-pbonzini@redhat.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-02-07 15:15:16 +01:00
3d004a371e
scripts: Explicit usage of Python 3 (scripts with __main__)
...
Use the program search path to find the Python 3 interpreter.
Patch created mechanically by running:
$ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \
$(git grep -l 'if __name__.*__main__')
Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Suggested-by: Daniel P. Berrangé <berrange@redhat.com >
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Acked-by: Stefan Hajnoczi <stefanha@redhat.com >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20200130163232.10446-6-philmd@redhat.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-02-07 15:12:48 +01:00
49ebe9b158
scripts/replay-dump.py: fix utf-8 mangling
...
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20190117153338.11820-1-alex.bennee@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Cleber Rosa <crosa@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2019-01-17 17:52:40 -02:00
f03868bd56
python: futurize -f libfuturize.fixes.fix_print_with_import
...
Change all Python code to use print as a function.
This is necessary for Python 3 compatibility.
Done using:
$ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
sort -u | grep -v README.sh4)
$ futurize -w -f libfuturize.fixes.fix_print_with_import $py
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Acked-by: Fam Zheng <famz@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20180608122952.2009-2-ehabkost@redhat.com >
[ehabkost: fixup tests/docker/docker.py]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2018-06-08 14:39:24 -03:00
821c113033
scripts/replay-dump.py: replay log dumper
...
This script is a debugging tool for looking through the contents of a
replay log file. It is incomplete but should fail gracefully at events
it doesn't understand.
It currently understands two different log formats as the audio
record/replay support was merged during since MTTCG. It was written to
help debug what has caused the BQL changes to break replay support.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20180227095310.1060.14500.stgit@pasha-VirtualBox>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2018-03-12 17:10:38 +01:00