From patchwork Mon Mar 12 18:55:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 10277137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE448602BD for ; Mon, 12 Mar 2018 19:11:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1CFD28E58 for ; Mon, 12 Mar 2018 19:11:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0BDB28E5A; Mon, 12 Mar 2018 19:11:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1FBE228E77 for ; Mon, 12 Mar 2018 19:11:24 +0000 (UTC) Received: from localhost ([::1]:34101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evSqx-0007lz-RU for patchwork-qemu-devel@patchwork.kernel.org; Mon, 12 Mar 2018 15:11:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evSbW-0003UK-Jl for qemu-devel@nongnu.org; Mon, 12 Mar 2018 14:55:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evSbT-0001cW-Jt for qemu-devel@nongnu.org; Mon, 12 Mar 2018 14:55:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36902) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evSbT-0001bF-8H for qemu-devel@nongnu.org; Mon, 12 Mar 2018 14:55:23 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64E877FEA1; Mon, 12 Mar 2018 18:55:22 +0000 (UTC) Received: from localhost (ovpn-116-64.gru2.redhat.com [10.97.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id E551217580; Mon, 12 Mar 2018 18:55:21 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Mon, 12 Mar 2018 15:55:01 -0300 Message-Id: <20180312185503.5746-2-ehabkost@redhat.com> In-Reply-To: <20180312185503.5746-1-ehabkost@redhat.com> References: <20180312185503.5746-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 12 Mar 2018 18:55:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/3] qemu.py: Use items() instead of iteritems() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cleber Rosa Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP items() is less efficient on Python 2.x, but makes the code work on both Python 2 and Python 3. Cc: Lukáš Doktor Cc: Philippe Mathieu-Daudé Cc: Cleber Rosa Signed-off-by: Eduardo Habkost Reviewed-by: Daniel P. Berrangé --- 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: