diff mbox series

[PULL,2/4] qemu.py: Use items() instead of iteritems()

Message ID 20180312221132.14141-3-ehabkost@redhat.com
State New
Headers show
Series [PULL,1/4] device-crash-test: New known crashes | expand

Commit Message

Eduardo Habkost March 12, 2018, 10:11 p.m. UTC
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>
Message-Id: <20180312185503.5746-2-ehabkost@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 scripts/qemu.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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: