Commit 82a6480a authored by Robert Iannucci's avatar Robert Iannucci Committed by Commit Bot

[presubmit_canned_checks] Stop exporting sys.path into PYTHONPATH.

Again, sys.path shouldn't ever be exported into PYTHONPATH :)

R=eakuefner@chromium.org, nodir@chromium.org, vadimsh@chromium.org

Bug: 825290,825174
Change-Id: Ia0594da3ff25972a08fdf74ae2aef5be79cbf3af
Reviewed-on: https://chromium-review.googlesource.com/978594Reviewed-by: 's avatarEthan Kuefner <eakuefner@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
parent 0d9ecc92
...@@ -727,13 +727,11 @@ def GetPylint(input_api, output_api, white_list=None, black_list=None, ...@@ -727,13 +727,11 @@ def GetPylint(input_api, output_api, white_list=None, black_list=None,
input_api.logging.info('Running pylint on %d files', len(files)) input_api.logging.info('Running pylint on %d files', len(files))
input_api.logging.debug('Running pylint on: %s', files) input_api.logging.debug('Running pylint on: %s', files)
# Copy the system path to the environment so pylint can find the right
# imports.
env = input_api.environ.copy() env = input_api.environ.copy()
import sys
env['PYTHONPATH'] = input_api.os_path.pathsep.join( env['PYTHONPATH'] = input_api.os_path.pathsep.join(
extra_paths_list + sys.path).encode('utf8') extra_paths_list).encode('utf8')
env.pop('VPYTHON_CLEAR_PYTHONPATH', None) env.pop('VPYTHON_CLEAR_PYTHONPATH', None)
input_api.logging.debug(' with extra PYTHONPATH: %r', extra_paths_list)
def GetPylintCmd(flist, extra, parallel): def GetPylintCmd(flist, extra, parallel):
# Windows needs help running python files so we explicitly specify # Windows needs help running python files so we explicitly specify
......
No-op file. Edit this to kick recipes. No-op file. Edit this to kick recipes. Yep.
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