Commit 22a68762 authored by maruel@chromium.org's avatar maruel@chromium.org

Fix Pylint presubmit check.

First, the environment variable for the child process was created but not
specified to subprocess.call().

Second, third_party/logilab/__init__.py tried to initialize itself with
pkg_resources.

TBR=chrisha@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10582031

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143111 0039d316-1c4b-4281-b951-d872f2087c98
parent 267d659c
......@@ -657,7 +657,7 @@ def RunPylint(input_api, output_api, white_list=None, black_list=None,
command = [input_api.python_executable,
input_api.os_path.join(_HERE, 'third_party', 'pylint.py')]
try:
return input_api.subprocess.call(command + files + extra_args)
return input_api.subprocess.call(command + files + extra_args, env=env)
except OSError:
return 'Pylint failed!'
......
......@@ -2144,7 +2144,8 @@ class CannedChecksUnittest(PresubmitTestsBase):
pylint = os.path.join(_ROOT, 'third_party', 'pylint.py')
pylintrc = os.path.join(_ROOT, 'pylintrc')
input_api.subprocess.call(
['pyyyyython', pylint, 'file1.py', '--rcfile=%s' % pylintrc])
['pyyyyython', pylint, 'file1.py', '--rcfile=%s' % pylintrc],
env=mox.IgnoreArg())
self.mox.ReplayAll()
results = presubmit_canned_checks.RunPylint(
......
"""generated file, don't modify or your data will be lost"""
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment