Commit b9006f94 authored by Mike Frysinger's avatar Mike Frysinger
Browse files

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
parent 2ef213ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment