util: Fix packet parser for Python3
authorEarl Ou <shunhsingou@google.com>
Fri, 29 Jan 2021 08:11:25 +0000 (16:11 +0800)
committerEarl Ou <shunhsingou@google.com>
Mon, 1 Feb 2021 08:21:13 +0000 (08:21 +0000)
Change-Id: Id5124135b0dd4049ce6531d7bdbc562d33f4d299
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40075
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/decode_packet_trace.py

index e3486e63a6ff205d86baf3b5fbeb1a8fb1bf5d99..21d7f9a157ee6dcaa66aad45cf1eef31854c89ff 100755 (executable)
@@ -63,7 +63,7 @@ def main():
         exit(-1)
 
     # Read the magic number in 4-byte Little Endian
-    magic_number = proto_in.read(4)
+    magic_number = proto_in.read(4).decode()
 
     if magic_number != "gem5":
         print("Unrecognized file", sys.argv[1])