setup: pylint: use pylint-2 binary if available

This commit is contained in:
Cole Robinson 2017-06-15 08:11:34 -04:00
parent b690908aa4
commit ced1d3cadb

View File

@ -590,7 +590,10 @@ class CheckPylint(distutils.core.Command):
os.system(cmd)
print("running pylint")
cmd = "pylint "
if os.path.exists("/usr/bin/pylint-2"):
cmd = "pylint-2 "
else:
cmd = "pylint "
cmd += "--rcfile tests/pylint.cfg "
cmd += "--output-format=%s " % output_format
cmd += "--ignore %s " % ",".join(