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

[Xen-changelog] [xen-unstable] xentrace: Fix TypeError handling of xentrace_format.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1195232720 0
# Node ID 270bd0fc3669413bd22d9aca9b6735486642aeeb
# Parent  e948f402c3562af748c3b179f92bd21cb0f2810e
xentrace: Fix TypeError handling of xentrace_format.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
---
 tools/xentrace/xentrace_format |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff -r e948f402c356 -r 270bd0fc3669 tools/xentrace/xentrace_format
--- a/tools/xentrace/xentrace_format    Fri Nov 16 17:03:46 2007 +0000
+++ b/tools/xentrace/xentrace_format    Fri Nov 16 17:05:20 2007 +0000
@@ -198,10 +198,15 @@ while not interrupted:
             if defs.has_key(str(event)): 
                 print defs[str(event)] % args
             else:
-               if defs.has_key(str(0)): print defs[str(0)] % args
+                if defs.has_key(str(0)): print defs[str(0)] % args
         except TypeError:
-            print defs[str(event)]
-            print args
+            if defs.has_key(str(event)):
+                print defs[str(event)]
+                print args
+            else:
+                if defs.has_key(str(0)):
+                    print defs[str(0)]
+                    print args
 
 
     except IOError, struct.error: sys.exit()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.