From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, "Lukáš Doktor" <ldoktor@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Cleber Rosa" <crosa@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] qemu.py: Use items() instead of iteritems()
Date: Mon, 12 Mar 2018 19:24:21 +0000 [thread overview]
Message-ID: <20180312192421.GB15677@redhat.com> (raw)
In-Reply-To: <20180312185503.5746-2-ehabkost@redhat.com>
On Mon, Mar 12, 2018 at 03:55:01PM -0300, Eduardo Habkost wrote:
> 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:
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-03-12 19:24 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 ` [Qemu-devel] [PATCH 1/3] qemu.py: Use items() instead of iteritems() Eduardo Habkost
2018-03-12 19:24 ` Daniel P. Berrangé [this message]
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=20180312192421.GB15677@redhat.com \
--to=berrange@redhat.com \
--cc=crosa@redhat.com \
--cc=ehabkost@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).