pylint: handle missing pylint better
If you don't have pylint installed, trying to run pylint will result in
confusuing output:
Traceback (most recent call last):
File "./tools/pylint.py", line 69, in <module>
sys.exit(main(sys.argv[1:]))
File "./tools/pylint.py", line 65, in main
os.execvp(cmd[0], cmd)
File "/usr/lib/python2.7/os.py", line 346, in execvp
_execvpe(file, args)
File "/usr/lib/python2.7/os.py", line 382, in _execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory
Rather than make people guess that they need to install pylint, catch
this error and display something more user friendly:
pylint.py: unable to run `pylint`: [Errno 2] No such file or directory
pylint.py: Try installing pylint: sudo apt-get install pylint
Bug: None
Test: `./tools/pylint.py tools/cpplint.py --executable-path asdf` no longer barfs
Change-Id: I7a259e2d950d66855c0dea367e035fe6adc4ce93
Loading
Please sign in to comment