[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/25] scripts/qmp: Fix shebang and imports
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 06/25] scripts/qmp: Fix shebang and imports |
Date: |
Sun, 31 May 2020 18:38:27 +0200 |
From: John Snow <jsnow@redhat.com>
There's more wrong with these scripts; They are in various stages of
disrepair. That's beyond the scope of this current patchset.
This just mechanically corrects the imports and the shebangs, as part of
ensuring that the python/qemu/lib refactoring didn't break anything
needlessly.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20200528222129.23826-2-jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
scripts/qmp/qmp | 4 +++-
scripts/qmp/qom-fuse | 4 +++-
scripts/qmp/qom-get | 4 +++-
scripts/qmp/qom-list | 4 +++-
scripts/qmp/qom-set | 4 +++-
scripts/qmp/qom-tree | 4 +++-
6 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp
index 0625fc2aba..8e52e4a54d 100755
--- a/scripts/qmp/qmp
+++ b/scripts/qmp/qmp
@@ -11,7 +11,9 @@
# See the COPYING file in the top-level directory.
import sys, os
-from qmp import QEMUMonitorProtocol
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
+from qemu.qmp import QEMUMonitorProtocol
def print_response(rsp, prefix=[]):
if type(rsp) == list:
diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse
index 6bada2c33d..5fa6b3bf64 100755
--- a/scripts/qmp/qom-fuse
+++ b/scripts/qmp/qom-fuse
@@ -15,7 +15,9 @@ import fuse, stat
from fuse import Fuse
import os, posix
from errno import *
-from qmp import QEMUMonitorProtocol
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
+from qemu.qmp import QEMUMonitorProtocol
fuse.fuse_python_api = (0, 2)
diff --git a/scripts/qmp/qom-get b/scripts/qmp/qom-get
index 7c5ede91bb..666df71832 100755
--- a/scripts/qmp/qom-get
+++ b/scripts/qmp/qom-get
@@ -13,7 +13,9 @@
import sys
import os
-from qmp import QEMUMonitorProtocol
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
+from qemu.qmp import QEMUMonitorProtocol
cmd, args = sys.argv[0], sys.argv[1:]
socket_path = None
diff --git a/scripts/qmp/qom-list b/scripts/qmp/qom-list
index bb68fd65d4..5074fd939f 100755
--- a/scripts/qmp/qom-list
+++ b/scripts/qmp/qom-list
@@ -13,7 +13,9 @@
import sys
import os
-from qmp import QEMUMonitorProtocol
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
+from qemu.qmp import QEMUMonitorProtocol
cmd, args = sys.argv[0], sys.argv[1:]
socket_path = None
diff --git a/scripts/qmp/qom-set b/scripts/qmp/qom-set
index 19881d85e9..240a78187f 100755
--- a/scripts/qmp/qom-set
+++ b/scripts/qmp/qom-set
@@ -13,7 +13,9 @@
import sys
import os
-from qmp import QEMUMonitorProtocol
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
+from qemu.qmp import QEMUMonitorProtocol
cmd, args = sys.argv[0], sys.argv[1:]
socket_path = None
diff --git a/scripts/qmp/qom-tree b/scripts/qmp/qom-tree
index fa91147a03..25b0781323 100755
--- a/scripts/qmp/qom-tree
+++ b/scripts/qmp/qom-tree
@@ -15,7 +15,9 @@
import sys
import os
-from qmp import QEMUMonitorProtocol
+
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
+from qemu.qmp import QEMUMonitorProtocol
cmd, args = sys.argv[0], sys.argv[1:]
socket_path = None
--
2.21.3
- [PULL 00/25] python-next patches for 2020-05-31, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 01/25] scripts/qemugdb: Remove shebang header, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 02/25] scripts/qemu-gdb: Use Python 3 interpreter, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 03/25] scripts/qmp: Use Python 3 interpreter, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 04/25] scripts/kvm/vmxcap: Use Python 3 interpreter and add pseudo-main(), Philippe Mathieu-Daudé, 2020/05/31
- [PULL 05/25] scripts/modules/module_block: Use Python 3 interpreter & add pseudo-main, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 06/25] scripts/qmp: Fix shebang and imports,
Philippe Mathieu-Daudé <=
- [PULL 07/25] python: remove more instances of sys.version_info, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 08/25] python/qemu/machine: add kill() method, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 09/25] python/qemu/machine: remove logging configuration, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 10/25] python/qemu: delint and add pylintrc, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 11/25] python/qemu: delint; add flake8 config, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 12/25] python/qemu: remove Python2 style super() calls, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 13/25] python/qemu: fix socket.makefile() typing, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 14/25] python/qemu: Adjust traceback typing, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 15/25] python/qemu/qmp: use True/False for non/blocking modes, Philippe Mathieu-Daudé, 2020/05/31
- [PULL 16/25] python/qemu/qmp: assert sockfile is not None, Philippe Mathieu-Daudé, 2020/05/31