diff options
Diffstat (limited to 'scripts/simpletrace.py')
-rwxr-xr-x | scripts/simpletrace.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py index 9d45c6ba4e..d4a50a1e2b 100755 --- a/scripts/simpletrace.py +++ b/scripts/simpletrace.py @@ -9,6 +9,7 @@ # # For help see docs/devel/tracing.txt +from __future__ import print_function import struct import re import inspect @@ -44,7 +45,7 @@ def get_record(edict, idtoname, rechdr, fobj): rec = (name, rechdr[1], rechdr[3]) try: event = edict[name] - except KeyError, e: + except KeyError as e: import sys sys.stderr.write('%s event is logged but is not declared ' \ 'in the trace events file, try using ' \ @@ -257,6 +258,6 @@ if __name__ == '__main__': else: fields.append('%s=0x%x' % (name, rec[i])) i += 1 - print ' '.join(fields) + print(' '.join(fields)) run(Formatter()) |