cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From e41361867982017cdfed92f1874395da2596cb51 Mon Sep 17 00:00:00 2001
Message-Id: <e41361867982017cdfed92f1874395da2596cb51.1387369730.git.minovotn@redhat.com>
In-Reply-To: <091eecc4fa42754760dfff393dabcc2b444e9693.1387369730.git.minovotn@redhat.com>
References: <091eecc4fa42754760dfff393dabcc2b444e9693.1387369730.git.minovotn@redhat.com>
From: Markus Armbruster <armbru@redhat.com>
Date: Tue, 10 Dec 2013 15:29:20 +0100
Subject: [PATCH 20/21] scripts/qapi.py: Avoid syntax not supported by Python
 2.4

RH-Author: Markus Armbruster <armbru@redhat.com>
Message-id: <1386689361-30281-18-git-send-email-armbru@redhat.com>
Patchwork-id: 56138
O-Subject: [PATCH 7.0 qemu-kvm 17/18] scripts/qapi.py: Avoid syntax not supported by Python 2.4
Bugzilla: 997915
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>

From: Peter Maydell <peter.maydell@linaro.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.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
(cherry picked from commit 21e0043bada1a24ae2ba6cd0051e104c0cbf9634)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 scripts/qapi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 scripts/qapi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/qapi.py b/scripts/qapi.py
index 0ebea94..1069310 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -161,7 +161,7 @@ class QAPISchema:
 def parse_schema(fp):
     try:
         schema = QAPISchema(fp)
-    except QAPISchemaError as e:
+    except QAPISchemaError, e:
         print >>sys.stderr, e
         exit(1)
 
-- 
1.7.11.7