From patchwork Thu May 22 13:53:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 351497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EFD16140083 for ; Thu, 22 May 2014 23:54:54 +1000 (EST) Received: from localhost ([::1]:37636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnTSO-0001jr-MU for incoming@patchwork.ozlabs.org; Thu, 22 May 2014 09:54:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnTRn-0000on-Qv for qemu-devel@nongnu.org; Thu, 22 May 2014 09:54:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnTRg-0005dU-Iz for qemu-devel@nongnu.org; Thu, 22 May 2014 09:54:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnTRg-0005dC-Ai for qemu-devel@nongnu.org; Thu, 22 May 2014 09:54:08 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4MDs48W019549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 May 2014 09:54:04 -0400 Received: from localhost (ovpn-113-100.phx2.redhat.com [10.3.113.100]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4MDs4xO008966; Thu, 22 May 2014 09:54:04 -0400 From: Luiz Capitulino To: peter.maydell@linaro.org Date: Thu, 22 May 2014 09:53:59 -0400 Message-Id: <1400766840-20726-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1400766840-20726-1-git-send-email-lcapitulino@redhat.com> References: <1400766840-20726-1-git-send-email-lcapitulino@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id s4MDs48W019549 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws Subject: [Qemu-devel] [PULL 2/3] scripts/qapi.py: Avoid syntax not supported by Python 2.4 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The Python "except Foo as x" syntax was only introduced in Python 2.6, but we aim to support Python 2.4 and later. Use the old-style "except Foo, x" syntax instead, thus fixing configure/compile on systems with older Python. Reported-by: Peter Maydell Tested-by: Andreas Färber Signed-off-by: Luiz Capitulino --- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 0265b40..86e9608 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -116,7 +116,7 @@ class QAPISchema: continue try: fobj = open(include_path, 'r') - except IOError as e: + except IOError, e: raise QAPIExprError(expr_info, '%s: %s' % (e.strerror, include)) exprs_include = QAPISchema(fobj, include, self.include_hist,