[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/4] qemu.py: Use items() instead of iteritems()
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 2/4] qemu.py: Use items() instead of iteritems() |
Date: |
Mon, 12 Mar 2018 19:11:30 -0300 |
items() is less efficient on Python 2.x, but makes the code work
on both Python 2 and Python 3.
Cc: Lukáš Doktor <address@hidden>
Cc: Philippe Mathieu-Daudé <address@hidden>
Cc: Cleber Rosa <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
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
- [Qemu-devel] [PULL 0/4] Python queue, 2018-03-12, Eduardo Habkost, 2018/03/12
- [Qemu-devel] [PULL 1/4] device-crash-test: New known crashes, Eduardo Habkost, 2018/03/12
- [Qemu-devel] [PULL 2/4] qemu.py: Use items() instead of iteritems(),
Eduardo Habkost <=
- [Qemu-devel] [PULL 3/4] qmp.py: Encode json data before sending, Eduardo Habkost, 2018/03/12
- [Qemu-devel] [PULL 4/4] device-crash-test: Use 'python' binary, Eduardo Habkost, 2018/03/12
- Re: [Qemu-devel] [PULL 0/4] Python queue, 2018-03-12, Peter Maydell, 2018/03/13