scripts: More Python fixes
v3 cover scripts: More Python fixes
Trivial Python3 fixes, again...
Since v2:
- Remove patch updating MAINTAINERS
Since v1:
- Added Alex Bennée A-b tags
- Addressed John Snow review comments
- Use /usr/bin/env
- Do not modify os.path (dropped last patch)
Philippe Mathieu-Daudé (2):
scripts/qemugdb: Remove shebang header
scripts/qmp: Use Python 3 interpreter
scripts/qemugdb/__init__.py | 3 +-- scripts/qemugdb/aio.py | 3 +-- scripts/qemugdb/coroutine.py | 3 +-- scripts/qemugdb/mtree.py | 4 +--- scripts/qemugdb/tcg.py | 1 - scripts/qmp/qom-get | 2 +- scripts/qmp/qom-list | 2 +- scripts/qmp/qom-set | 2 +- scripts/qmp/qom-tree | 2 +- 9 files changed, 8 insertions(+), 14 deletions(-)
Signature · 1 line
2.21.3
PATCH v3 1/2 scripts/qemugdb: Remove shebang header
These scripts are loaded as plugin by GDB (and they don't have any __main__ entry point). Remove the shebang header.
--- scripts/qemugdb/__init__.py | 3 +-- scripts/qemugdb/aio.py | 3 +-- scripts/qemugdb/coroutine.py | 3 +-- scripts/qemugdb/mtree.py | 4 +--- scripts/qemugdb/tcg.py | 1 - 5 files changed, 4 insertions(+), 10 deletions(-)
scripts/qemugdb/__init__.py +1 -2
@@ -1,5 +1,4 @@ -#!/usr/bin/python - +# # GDB debugging support # # Copyright (c) 2015 Linaro Ltd
scripts/qemugdb/aio.py +1 -2
@@ -1,5 +1,4 @@ -#!/usr/bin/python - +# # GDB debugging support: aio/iohandler debug # # Copyright (c) 2015 Red Hat, Inc.
scripts/qemugdb/coroutine.py +1 -2
@@ -1,5 +1,4 @@ -#!/usr/bin/python - +# # GDB debugging support # # Copyright 2012 Red Hat, Inc. and/or its affiliates
scripts/qemugdb/mtree.py +1 -3
@@ -1,5 +1,4 @@ -#!/usr/bin/python - +# # GDB debugging support # # Copyright 2012 Red Hat, Inc. and/or its affiliates
@@ -84,4 +83,3 @@ def print_item(self, ptr, offset = gdb.Value(0), level = 0): while not isnull(subregion): self.print_item(subregion, addr, level) subregion = subregion['subregions_link']['tqe_next'] -
scripts/qemugdb/tcg.py +0 -1
@@ -1,4 +1,3 @@ -#!/usr/bin/python # -*- coding: utf-8 -*- # # GDB debugging support, TCG status
Signature · 1 line
2.21.3
Re: [PATCH v3 1/2] scripts/qemugdb: Remove shebang header
Am 12.05.2020 um 09:06 hat Philippe Mathieu-Daudé geschrieben:
Quoted 11 lines
These scripts are loaded as plugin by GDB (and they don't have any
__main__entry point). Remove the shebang header.Acked-by Alex Bennée <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- scripts/qemugdb/__init__.py | 3 +-- scripts/qemugdb/aio.py | 3 +-- scripts/qemugdb/coroutine.py | 3 +-- scripts/qemugdb/mtree.py | 4 +--- scripts/qemugdb/tcg.py | 1 -
There is still a shebang line left in scripts/qemugdb/timers.py.
Kevin
Re: [PATCH v3 1/2] scripts/qemugdb: Remove shebang header
Quoted 13 lines · Kevin Wolf
Am 12.05.2020 um 09:06 hat Philippe Mathieu-Daudé geschrieben:
Quoted 11 lines
These scripts are loaded as plugin by GDB (and they don't have any
__main__entry point). Remove the shebang header.Acked-by Alex Bennée <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- scripts/qemugdb/__init__.py | 3 +-- scripts/qemugdb/aio.py | 3 +-- scripts/qemugdb/coroutine.py | 3 +-- scripts/qemugdb/mtree.py | 4 +--- scripts/qemugdb/tcg.py | 1 -
Quoted 1 line
There is still a shebang line left in
scripts/qemugdb/timers.py.
Oops, thanks for catching this.
Quoted 3 lines
Kevin
PATCH v3 2/2 scripts/qmp: Use Python 3 interpreter
In reply to Philippe Mathieu-Daudé--- scripts/qmp/qom-get | 2 +- scripts/qmp/qom-list | 2 +- scripts/qmp/qom-set | 2 +- scripts/qmp/qom-tree | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
scripts/qmp/qom-get +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 ## # QEMU Object Model test tools #
scripts/qmp/qom-list +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 ## # QEMU Object Model test tools #
scripts/qmp/qom-set +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 ## # QEMU Object Model test tools #
scripts/qmp/qom-tree +1 -1
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 ## # QEMU Object Model test tools #
Signature · 1 line
2.21.3
Re: [PATCH v3 2/2] scripts/qmp: Use Python 3 interpreter
Am 12.05.2020 um 09:06 hat Philippe Mathieu-Daudé geschrieben:
Quoted 1 line
Signed-off-by Philippe Mathieu-Daudé <[email protected]>