Commit 7dd84cc1 authored by Guido van Rossum's avatar Guido van Rossum

- Fix bug in previous checkin: unpack -> struct.unpack.

- Always print start and flip events.  Add the newline before the
  stats back.
parent 63977eae
......@@ -115,7 +115,7 @@ def main():
file0 += 1
code = code & 0x7e
bycode[code] = bycode.get(code, 0) + 1
if verbose:
if verbose or code in (0x00, 0x70):
print "%s %d %02x %016x %016x %1s %s" % (
time.ctime(ts)[4:-5],
current,
......@@ -135,7 +135,6 @@ def main():
# Print statistics
if dostats:
if verbose:
print
print "Read %s records (%s bytes) in %.1f seconds" % (
addcommas(records), addcommas(bytes), rte-rt0)
......@@ -160,7 +159,7 @@ def main():
explain.get(code) or "*** unknown code ***")
def U64(s):
h, v = unpack(">II", s)
h, v = struct.unpack(">II", s)
return (long(h) << 32) + v
def addcommas(n):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment