WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix TypeError handling of xentrace_format

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix TypeError handling of xentrace_format
From: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
Date: Tue, 13 Nov 2007 20:57:14 +0900
Delivery-date: Tue, 13 Nov 2007 03:57:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)
Hi,

Attached patch fixes TypeError handling of xentrace_format.

Regards,
-------------------
Yosuke Iwamatsu
        NEC Corporation

# HG changeset patch
# User Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
# Date 1194919149 -32400
# Node ID 2770b04195ea24e6918dc59ae7943483485b4401
# Parent  837f83225153547109480d63b3386cb8f65b5274
Fix TypeError handling of xentrace_format.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>

diff -r 837f83225153 -r 2770b04195ea tools/xentrace/xentrace_format
--- a/tools/xentrace/xentrace_format    Fri Nov 09 12:08:37 2007 +0000
+++ b/tools/xentrace/xentrace_format    Tue Nov 13 10:59:09 2007 +0900
@@ -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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix TypeError handling of xentrace_format, Yosuke Iwamatsu <=