diff options
Diffstat (limited to 'usr/src/tools/scripts/git-pbchk.py')
-rw-r--r-- | usr/src/tools/scripts/git-pbchk.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index dc40a5d222..559cf7e9e5 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -21,7 +21,7 @@ # Copyright (c) 2015, 2016 by Delphix. All rights reserved. # Copyright 2016 Nexenta Systems, Inc. # Copyright (c) 2019, Joyent, Inc. -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # from __future__ import print_function @@ -260,7 +260,7 @@ def cstyle(root, parent, flist, output): ret = 0 output.write("C style:\n") for f in flist(lambda x: x.endswith('.c') or x.endswith('.h')): - with io.open(f, encoding='utf-8', errors='replace') as fh: + with io.open(f, mode='rb') as fh: ret |= CStyle.cstyle(fh, output=output, picky=True, check_posix_types=True, check_continuation=True) @@ -279,7 +279,7 @@ def manlint(root, parent, flist, output): output.write("Man page format/spelling:\n") ManfileRE = re.compile(r'.*\.[0-9][a-z]*$', re.IGNORECASE) for f in flist(lambda x: ManfileRE.match(x)): - with io.open(f, encoding='utf-8', errors='replace') as fh: + with io.open(f, mode='rb') as fh: ret |= ManLint.manlint(fh, output=output, picky=True) ret |= SpellCheck.spellcheck(fh, output=output) return ret |