aboutsummaryrefslogtreecommitdiff
path: root/scripts/qmp
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2018-06-08 09:29:44 -0300
committerEduardo Habkost <ehabkost@redhat.com>2018-06-08 14:39:24 -0300
commit068cf7a44cd4d65c05aa877dbebced295be5ce44 (patch)
tree93f47a863716ccd9a7ac71cab206645fb1f1d0b7 /scripts/qmp
parentf03868bd5653265e97b253102d77d83ea85efdea (diff)
downloadqemu-068cf7a44cd4d65c05aa877dbebced295be5ce44.zip
qemu-068cf7a44cd4d65c05aa877dbebced295be5ce44.tar.gz
qemu-068cf7a44cd4d65c05aa877dbebced295be5ce44.tar.bz2
python: futurize -f libfuturize.fixes.fix_absolute_import
Make implicit relative imports explicit and add "from __future__ import absolute_import" at the top of each relevant module. 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_absolute_import $py Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-3-ehabkost@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'scripts/qmp')
-rwxr-xr-xscripts/qmp/qemu-ga-client3
-rwxr-xr-xscripts/qmp/qmp3
-rwxr-xr-xscripts/qmp/qmp-shell3
-rwxr-xr-xscripts/qmp/qom-fuse3
-rwxr-xr-xscripts/qmp/qom-get3
-rwxr-xr-xscripts/qmp/qom-list3
-rwxr-xr-xscripts/qmp/qom-set3
-rwxr-xr-xscripts/qmp/qom-tree3
8 files changed, 16 insertions, 8 deletions
diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client
index 8510814..6045fcd 100755
--- a/scripts/qmp/qemu-ga-client
+++ b/scripts/qmp/qemu-ga-client
@@ -37,10 +37,11 @@
#
from __future__ import print_function
+from __future__ import absolute_import
import base64
import random
-import qmp
+from . import qmp
class QemuGuestAgent(qmp.QEMUMonitorProtocol):
diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp
index 16d3bdb..4d2be4e 100755
--- a/scripts/qmp/qmp
+++ b/scripts/qmp/qmp
@@ -11,8 +11,9 @@
# See the COPYING file in the top-level directory.
from __future__ import print_function
+from __future__ import absolute_import
import sys, os
-from qmp import QEMUMonitorProtocol
+from .qmp import QEMUMonitorProtocol
def print_response(rsp, prefix=[]):
if type(rsp) == list:
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index b1cc7e2..38c99d8 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -66,7 +66,8 @@
# sent to QEMU, which is useful for debugging and documentation generation.
from __future__ import print_function
-import qmp
+from __future__ import absolute_import
+from . import qmp
import json
import ast
import readline
diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse
index 5c6754a..b75aa72 100755
--- a/scripts/qmp/qom-fuse
+++ b/scripts/qmp/qom-fuse
@@ -11,11 +11,12 @@
# the COPYING file in the top-level directory.
##
+from __future__ import absolute_import
import fuse, stat
from fuse import Fuse
import os, posix
from errno import *
-from qmp import QEMUMonitorProtocol
+from .qmp import QEMUMonitorProtocol
fuse.fuse_python_api = (0, 2)
diff --git a/scripts/qmp/qom-get b/scripts/qmp/qom-get
index 291c8bf..6313f27 100755
--- a/scripts/qmp/qom-get
+++ b/scripts/qmp/qom-get
@@ -12,9 +12,10 @@
##
from __future__ import print_function
+from __future__ import absolute_import
import sys
import os
-from qmp import QEMUMonitorProtocol
+from .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 cd907bb..80b0a3d 100755
--- a/scripts/qmp/qom-list
+++ b/scripts/qmp/qom-list
@@ -12,9 +12,10 @@
##
from __future__ import print_function
+from __future__ import absolute_import
import sys
import os
-from qmp import QEMUMonitorProtocol
+from .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 fbe4b3e..cbffb65 100755
--- a/scripts/qmp/qom-set
+++ b/scripts/qmp/qom-set
@@ -12,9 +12,10 @@
##
from __future__ import print_function
+from __future__ import absolute_import
import sys
import os
-from qmp import QEMUMonitorProtocol
+from .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 0ffd1ff..ad4be23 100755
--- a/scripts/qmp/qom-tree
+++ b/scripts/qmp/qom-tree
@@ -14,9 +14,10 @@
##
from __future__ import print_function
+from __future__ import absolute_import
import sys
import os
-from qmp import QEMUMonitorProtocol
+from .qmp import QEMUMonitorProtocol
cmd, args = sys.argv[0], sys.argv[1:]
socket_path = None