qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH V3 1/3] test-qapi: Make test-qapi.py spit useful err


From: Benoît Canet
Subject: [Qemu-devel] [PATCH V3 1/3] test-qapi: Make test-qapi.py spit useful error messages.
Date: Fri, 28 Mar 2014 17:25:30 +0100

In case of exception str(e) with e being the exception is more detailled.

Signed-off-by: Benoit Canet <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
 tests/qapi-schema/test-qapi.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index b3d1e1d..ac6da13 100644
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -18,8 +18,8 @@ try:
     exprs = parse_schema(sys.stdin)
 except SystemExit:
     raise
-except:
-    print >>sys.stderr, "Crashed:", sys.exc_info()[0]
+except Exception, e:
+    print >>sys.stderr, "Crashed:", str(e)
     exit(1)
 
 pprint(exprs)
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]