Fixed _root_debug related crash. GH344

Merges pull request #344 from Johan-Dahlberg/fix_root_debug

thanks!
This commit is contained in:
Gregory P. Smith 2018-04-13 12:13:45 -07:00 committed by GitHub
commit 1b206ee362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
cpplint/cpplint.py vendored
View File

@ -1852,8 +1852,8 @@ def GetHeaderGuardCPPVariable(filename):
PathSplitToList(_root))
if _root_debug:
sys.stderr.write("_root lstrip (maybe_path=%s, file_path_from_root=%s," +
" _root=%s)\n" %(maybe_path, file_path_from_root, _root))
sys.stderr.write(("_root lstrip (maybe_path=%s, file_path_from_root=%s," +
" _root=%s)\n") %(maybe_path, file_path_from_root, _root))
if maybe_path:
return os.path.join(*maybe_path)
@ -1866,8 +1866,8 @@ def GetHeaderGuardCPPVariable(filename):
PathSplitToList(root_abspath))
if _root_debug:
sys.stderr.write("_root prepend (maybe_path=%s, full_path=%s, " +
"root_abspath=%s)\n" %(maybe_path, full_path, root_abspath))
sys.stderr.write(("_root prepend (maybe_path=%s, full_path=%s, " +
"root_abspath=%s)\n") %(maybe_path, full_path, root_abspath))
if maybe_path:
return os.path.join(*maybe_path)