From: Earl Ou Date: Fri, 29 Jan 2021 08:11:25 +0000 (+0800) Subject: util: Fix packet parser for Python3 X-Git-Tag: develop-gem5-snapshot~180 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2c6e8bd130e859a56842e0fe9f9021ea91c5623;p=gem5.git 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 --- 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])