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: https://gem5-review.googlesource.com/c/public/gem5/+/28588 Change-Id: I9a30ecc24d4741853ed1c2d0c03addf57c3e5b6c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30336 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -347,7 +347,7 @@ class SortedIncludes(Verifier):
|
||||
def check(self, filename, regions=all_regions, fobj=None, silent=False):
|
||||
close = False
|
||||
if fobj is None:
|
||||
fobj = self.open(filename, 'r')
|
||||
fobj = self.open(filename, 'rb')
|
||||
close = True
|
||||
norm_fname = self.normalize_filename(filename)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user