From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Lukáš Doktor" <ldoktor@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PATCH 1/3] qemu.py: Use items() instead of iteritems()
Date: Mon, 12 Mar 2018 15:55:01 -0300 [thread overview]
Message-ID: <20180312185503.5746-2-ehabkost@redhat.com> (raw)
In-Reply-To: <20180312185503.5746-1-ehabkost@redhat.com>
items() is less efficient on Python 2.x, but makes the code work
on both Python 2 and Python 3.
Cc: Lukáš Doktor <ldoktor@redhat.com>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
scripts/qemu.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 305a946562..08a3e9af5a 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -277,7 +277,7 @@ class QEMUMachine(object):
def qmp(self, cmd, conv_keys=True, **args):
'''Invoke a QMP command and return the response dict'''
qmp_args = dict()
- for key, value in args.iteritems():
+ for key, value in args.items():
if conv_keys:
qmp_args[key.replace('_', '-')] = value
else:
--
2.14.3
next prev parent reply other threads:[~2018-03-12 18:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 18:55 [Qemu-devel] [PATCH 0/3] scripts: Python 3 compatibility fixes Eduardo Habkost
2018-03-12 18:55 ` Eduardo Habkost [this message]
2018-03-12 19:24 ` [Qemu-devel] [PATCH 1/3] qemu.py: Use items() instead of iteritems() Daniel P. Berrangé
2018-03-12 23:02 ` Philippe Mathieu-Daudé
2018-03-13 1:25 ` Eduardo Habkost
2018-03-12 18:55 ` [Qemu-devel] [PATCH 2/3] qmp.py: Encode json data before sending Eduardo Habkost
2018-03-12 19:24 ` Daniel P. Berrangé
2018-03-12 23:03 ` Philippe Mathieu-Daudé
2018-03-12 18:55 ` [Qemu-devel] [PATCH 3/3] device-crash-test: Use 'python' binary Eduardo Habkost
2018-03-12 19:24 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180312185503.5746-2-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=crosa@redhat.com \
--cc=f4bug@amsat.org \
--cc=ldoktor@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).