Fix TypeError handling of xentrace_format
PATCH 1/1 Fix TypeError handling of xentrace_format
Hi,
Attached patch fixes TypeError handling of xentrace_format.
Regards,
-------------------
Yosuke Iwamatsu
NEC Corporation
# HG changeset patch
# User Yosuke Iwamatsu <[email protected]> # Date 1194919149 -32400
# Node ID 2770b04195ea24e6918dc59ae7943483485b4401 # Parent 837f83225153547109480d63b3386cb8f65b5274 Fix TypeError handling of xentrace_format.
Signed-off-by Yosuke Iwamatsu <[email protected]>
tools/xentrace/xentrace_format +8 -3
@@ -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
[email protected]
http://lists.xensource.com/xen-devel