From 9a6eb06b470e9c1d8649210d4e7e79c603bf4cf0 Mon Sep 17 00:00:00 2001 From: Cody Peter Mello Date: Tue, 4 Oct 2016 03:34:23 +0000 Subject: OS-5513 git-pbchk(1ONBLD) fails when running on commits that update submodules Reviewed by: Patrick Mooney Approved by: Ryan Zezeski --- usr/src/tools/scripts/git-pbchk.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/src') diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index 9420812a21..f271e28dde 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -209,7 +209,7 @@ def gen_files(root, parent, paths, exclude): # invocations of git(). continue empty = not res.readline() - if (os.path.exists(f) and not empty and select(f) and not exclude(f)): + if (os.path.isfile(f) and not empty and select(f) and not exclude(f)): yield f return ret @@ -297,7 +297,7 @@ def manlint(root, parent, flist, output): fh = open(f, 'r') ret |= ManLint.manlint(fh, output=output, picky=True) ret |= SpellCheck.spellcheck(fh, output=output) - fh.close() + fh.close() return ret def keywords(root, parent, flist, output): @@ -341,7 +341,7 @@ def nits(root, parent, paths): hdrchk, jstyle, keywords, - manlint, + manlint, mapfilechk] run_checks(root, parent, cmds, paths) @@ -353,7 +353,7 @@ def pbchk(root, parent, paths): hdrchk, jstyle, keywords, - manlint, + manlint, mapfilechk] run_checks(root, parent, cmds) -- cgit v1.2.3