summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2008-08-22 18:12:49 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2008-08-22 18:12:49 +0000
commitdaaba390b234e2a20dc48ce3f10834ef877d4002 (patch)
tree36b36424739b91d5920addc68793ed68b18797df /utils
parentc98cc0958b24883f53872d1e737ed27d94a238d7 (diff)
heck for pylint and print a more useful error message if it can't be
imported, hinting that it needs to be installed. Risk: Low Visibility: run_pylint.py gives a more helpful error if pylint is not installed. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@2028 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'utils')
-rw-r--r--utils/run_pylint.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/run_pylint.py b/utils/run_pylint.py
index be757ff4..e0115428 100644
--- a/utils/run_pylint.py
+++ b/utils/run_pylint.py
@@ -3,6 +3,13 @@
import os, sys, fnmatch
import common
+# do a basic check to see if pylint is even installed
+try:
+ import pylint
+except ImportError:
+ print "Unable to import pylint, it may need to be installed"
+ sys.exit(1)
+
pylintrc_path = os.path.expanduser('~/.pylintrc')
if not os.path.exists(pylintrc_path):
open(pylintrc_path, 'w').close()