diff options
Diffstat (limited to 'scripts/qmp/qom-set')
-rwxr-xr-x | scripts/qmp/qom-set | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/qmp/qom-set b/scripts/qmp/qom-set index 94e2778922..0352668812 100755 --- a/scripts/qmp/qom-set +++ b/scripts/qmp/qom-set @@ -11,9 +11,11 @@ # the COPYING file in the top-level directory. ## +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 @@ -34,7 +36,7 @@ def usage_error(error_msg = "unspecified error"): if len(args) > 0: if args[0] == "-h": - print usage() + print(usage()) exit(0); elif args[0] == "-s": try: @@ -44,7 +46,7 @@ if len(args) > 0: args = args[2:] if not socket_path: - if os.environ.has_key('QMP_SOCKET'): + if 'QMP_SOCKET' in os.environ: socket_path = os.environ['QMP_SOCKET'] else: usage_error("no QMP socket path or address given"); @@ -61,4 +63,4 @@ else: srv = QEMUMonitorProtocol(socket_path) srv.connect() -print srv.command('qom-set', path=path, property=prop, value=value) +print(srv.command('qom-set', path=path, property=prop, value=value)) |