From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmonE-0007rf-WE for qemu-devel@nongnu.org; Tue, 20 May 2014 14:29:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmonA-00027e-EH for qemu-devel@nongnu.org; Tue, 20 May 2014 14:29:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmonA-00027T-7j for qemu-devel@nongnu.org; Tue, 20 May 2014 14:29:36 -0400 Date: Tue, 20 May 2014 14:29:29 -0400 From: Luiz Capitulino Message-ID: <20140520142929.37e2cb7f@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] scripts/qapi.py: Avoid syntax not supported by Python 2.4 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: peter.maydell@linaro.org, vilanova@ac.upc.edu, armbru@redhat.com 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 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, -- 1.9.0