summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/git-pbchk.py
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2019-02-05 23:57:11 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2019-02-09 21:43:47 +0000
commita90997d2f0a442a8aa8a56cbbbbf577716a18742 (patch)
tree929e591d7a7bd09176e63fb9208648874f5208cb /usr/src/tools/scripts/git-pbchk.py
parent1b58875ad7966cf2c85ee8e92f3da04f0a3b2f7a (diff)
downloadillumos-joyent-a90997d2f0a442a8aa8a56cbbbbf577716a18742.tar.gz
10347 git-pbchk requires more python3 fixes
Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net> Reviewed by: C Fraire <cfraire@me.com> Reviewed by: John Levon <john.levon@joyent.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
Diffstat (limited to 'usr/src/tools/scripts/git-pbchk.py')
-rw-r--r--usr/src/tools/scripts/git-pbchk.py6
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