aboutsummaryrefslogtreecommitdiff
path: root/scripts/qmp/qmp-shell
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/qmp-shell
parentf03868bd5653265e97b253102d77d83ea85efdea (diff)
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/qmp-shell')
-rwxr-xr-xscripts/qmp/qmp-shell3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index b1cc7e2271..38c99d8f72 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