cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-scripts-qapi.py-Avoid-syntax-not-supported-by-Python.patch

0a122b
From e41361867982017cdfed92f1874395da2596cb51 Mon Sep 17 00:00:00 2001
0a122b
Message-Id: <e41361867982017cdfed92f1874395da2596cb51.1387369730.git.minovotn@redhat.com>
0a122b
In-Reply-To: <091eecc4fa42754760dfff393dabcc2b444e9693.1387369730.git.minovotn@redhat.com>
0a122b
References: <091eecc4fa42754760dfff393dabcc2b444e9693.1387369730.git.minovotn@redhat.com>
0a122b
From: Markus Armbruster <armbru@redhat.com>
0a122b
Date: Tue, 10 Dec 2013 15:29:20 +0100
0a122b
Subject: [PATCH 20/21] scripts/qapi.py: Avoid syntax not supported by Python
0a122b
 2.4
0a122b
0a122b
RH-Author: Markus Armbruster <armbru@redhat.com>
0a122b
Message-id: <1386689361-30281-18-git-send-email-armbru@redhat.com>
0a122b
Patchwork-id: 56138
0a122b
O-Subject: [PATCH 7.0 qemu-kvm 17/18] scripts/qapi.py: Avoid syntax not supported by Python 2.4
0a122b
Bugzilla: 997915
0a122b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
0a122b
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
0a122b
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
0a122b
0a122b
From: Peter Maydell <peter.maydell@linaro.org>
0a122b
0a122b
The Python "except Foo as x" syntax was only introduced in
0a122b
Python 2.6, but we aim to support Python 2.4 and later.
0a122b
Use the old-style "except Foo, x" syntax instead, thus
0a122b
fixing configure/compile on systems with older Python.
0a122b
0a122b
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
0a122b
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
0a122b
(cherry picked from commit 21e0043bada1a24ae2ba6cd0051e104c0cbf9634)
0a122b
Signed-off-by: Markus Armbruster <armbru@redhat.com>
0a122b
---
0a122b
 scripts/qapi.py | 2 +-
0a122b
 1 file changed, 1 insertion(+), 1 deletion(-)
0a122b
0a122b
Signed-off-by: Michal Novotny <minovotn@redhat.com>
0a122b
---
0a122b
 scripts/qapi.py | 2 +-
0a122b
 1 file changed, 1 insertion(+), 1 deletion(-)
0a122b
0a122b
diff --git a/scripts/qapi.py b/scripts/qapi.py
0a122b
index 0ebea94..1069310 100644
0a122b
--- a/scripts/qapi.py
0a122b
+++ b/scripts/qapi.py
0a122b
@@ -161,7 +161,7 @@ class QAPISchema:
0a122b
 def parse_schema(fp):
0a122b
     try:
0a122b
         schema = QAPISchema(fp)
0a122b
-    except QAPISchemaError as e:
0a122b
+    except QAPISchemaError, e:
0a122b
         print >>sys.stderr, e
0a122b
         exit(1)
0a122b
 
0a122b
-- 
0a122b
1.7.11.7
0a122b