mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Permits running pylint without pylintrc.
R=iannucci@chromium.org BUG= Review URL: https://codereview.chromium.org/1426683006 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297425 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@@ -18,7 +18,11 @@ _RC_FILE = os.path.join(_HERE, 'pylintrc')
|
||||
# Run pylint. We prepend the command-line with the depot_tools rcfile. If
|
||||
# another rcfile is to be used, passing --rcfile a second time on the command-
|
||||
# line will work fine.
|
||||
command = [sys.executable, _PYLINT, '--rcfile=%s' % _RC_FILE] + sys.argv[1:]
|
||||
command = [sys.executable, _PYLINT]
|
||||
if os.path.isfile(_RC_FILE):
|
||||
# The file can be removed to test 'normal' pylint behavior.
|
||||
command.append('--rcfile=%s' % _RC_FILE)
|
||||
command.extend(sys.argv[1:])
|
||||
try:
|
||||
sys.exit(subprocess.call(command))
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Reference in New Issue
Block a user