Use input_api.sys instead of import sys

Follow up on https://crrev.com/c/2929386

R=dpranke@google.com

Change-Id: Id977cfae561ecfb231372348387b084e098e6747
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2947981
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
changes/81/2947981/2
Josip Sokcevic 4 years ago committed by LUCI CQ
parent b9236628c6
commit 104ca4d094

@ -944,7 +944,6 @@ def GetPylint(input_api,
input_api.logging.debug(' with extra PYTHONPATH: %r', extra_paths_list)
def GetPylintCmd(flist, extra, parallel):
import sys
# Windows needs help running python files so we explicitly specify
# the interpreter to use. It also has limitations on the size of
# the command-line, so we pass arguments via a pipe.
@ -976,7 +975,7 @@ def GetPylint(input_api,
description += ' on %d cores' % input_api.cpu_count
kwargs['stdin'] = '\n'.join(args + flist)
if sys.version_info.major != 2:
if input_api.sys.version_info.major != 2:
kwargs['stdin'] = kwargs['stdin'].encode('utf-8')
return input_api.Command(

Loading…
Cancel
Save