Skip to content

Commit e274046

Browse files
committed
setup: pylint: Use pylint-2 if available
1 parent 02f33b9 commit e274046

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ def _run(self):
138138
files = ["bugzilla/", "bin-bugzilla", "examples/*.py", "tests/*.py"]
139139
output_format = sys.stdout.isatty() and "colorized" or "text"
140140

141-
cmd = "pylint "
141+
if os.path.exists("/usr/bin/pylint-2"):
142+
cmd = "pylint-2 "
143+
else:
144+
cmd = "pylint "
142145
cmd += "--output-format=%s " % output_format
143146
cmd += " ".join(files)
144147
os.system(cmd + " --rcfile tests/pylint.cfg")

0 commit comments

Comments
 (0)