ia64/xen-unstable

changeset 16389:270bd0fc3669

xentrace: Fix TypeError handling of xentrace_format.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Nov 16 17:05:20 2007 +0000 (2007-11-16)
parents e948f402c356
children e2f5b5b24e07
files tools/xentrace/xentrace_format
line diff
     1.1 --- a/tools/xentrace/xentrace_format	Fri Nov 16 17:03:46 2007 +0000
     1.2 +++ b/tools/xentrace/xentrace_format	Fri Nov 16 17:05:20 2007 +0000
     1.3 @@ -198,10 +198,15 @@ while not interrupted:
     1.4              if defs.has_key(str(event)): 
     1.5                  print defs[str(event)] % args
     1.6              else:
     1.7 -               if defs.has_key(str(0)): print defs[str(0)] % args
     1.8 +                if defs.has_key(str(0)): print defs[str(0)] % args
     1.9          except TypeError:
    1.10 -            print defs[str(event)]
    1.11 -            print args
    1.12 +            if defs.has_key(str(event)):
    1.13 +                print defs[str(event)]
    1.14 +                print args
    1.15 +            else:
    1.16 +                if defs.has_key(str(0)):
    1.17 +                    print defs[str(0)]
    1.18 +                    print args
    1.19  
    1.20  
    1.21      except IOError, struct.error: sys.exit()