From f2c6e8bd130e859a56842e0fe9f9021ea91c5623 Mon Sep 17 00:00:00 2001 From: Earl Ou Date: Fri, 29 Jan 2021 16:11:25 +0800 Subject: [PATCH] util: Fix packet parser for Python3 Change-Id: Id5124135b0dd4049ce6531d7bdbc562d33f4d299 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40075 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- util/decode_packet_trace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/decode_packet_trace.py b/util/decode_packet_trace.py index e3486e63a..21d7f9a15 100755 --- a/util/decode_packet_trace.py +++ b/util/decode_packet_trace.py @@ -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]) -- 2.30.2