From 1081175181bc5c4495f7bc7f565bf3af4f1d6085 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Wed, 8 Jan 2020 10:23:12 +0000 Subject: 12171 pbchk traceback when checking .java file under python3 Reviewed by: Toomas Soome Reviewed by: John Levon Approved by: Dan McDonald --- usr/src/tools/scripts/git-pbchk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/src/tools/scripts/git-pbchk.py') diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index 99bce29087..ec01255c6e 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 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # from __future__ import print_function @@ -280,7 +280,7 @@ def jstyle(root, parent, flist, output): ret = 0 output.write("Java style:\n") for f in flist(lambda x: x.endswith('.java')): - with io.open(f, encoding='utf-8', errors='replace') as fh: + with io.open(f, mode='rb') as fh: ret |= JStyle.jstyle(fh, output=output, picky=True) return ret -- cgit v1.2.3