Bobby R. Bruce has submitted this change. ( )

Change subject: python,util: Fixed string decoding in include verifier

python,util: Fixed string decoding in include verifier

The Python2 <-> Python3 port included a decode on a string as part of
the include statement git-hook verifier. This results in a failure. To
fix this issue, the file to be checked is opened in binary mode.

This issue was highlighted by Gabe Black here:

Change-Id: I9a30ecc24d4741853ed1c2d0c03addf57c3e5b6c
Reviewed-by: Gabe Black <>
Reviewed-by: Jason Lowe-Power <>
Maintainer: Gabe Black <>
Tested-by: kokoro <>
M util/style/
1 file changed, 1 insertion(+), 1 deletion(-)

  Jason Lowe-Power: Looks good to me, approved
Gabe Black: Looks good to me, but someone else must approve; Looks good to me, approved
  kokoro: Regressions pass

diff --git a/util/style/ b/util/style/
index 00cf070..85f31ce 100644
--- a/util/style/
+++ b/util/style/
@@ -347,7 +347,7 @@
def check(self, filename, regions=all_regions, fobj=None, silent=False):
         close = False
         if fobj is None:
-            fobj =, 'r')
+            fobj =, 'rb')
             close = True
         norm_fname = self.normalize_filename(filename)

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I9a30ecc24d4741853ed1c2d0c03addf57c3e5b6c
Gerrit-Change-Number: 30336
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce <>
Gerrit-Reviewer: Bobby R. Bruce <>
Gerrit-Reviewer: Daniel Carvalho <>
Gerrit-Reviewer: Gabe Black <>
Gerrit-Reviewer: Giacomo Travaglini <>
Gerrit-Reviewer: Jason Lowe-Power <>
Gerrit-Reviewer: kokoro <>
Gerrit-MessageType: merged
gem5-dev mailing list --
To unsubscribe send an email to

Reply via email to