pylint.lint.Run calls sys.exit when the function completes. Starting
with Pylint 0.20.0, Run can take an additional argument to not exit.
This will allow run_pylint.py to continue checking other files.

Signed-off-by: Vinson Lee <[email protected]>
---
 utils/run_pylint.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/utils/run_pylint.py b/utils/run_pylint.py
index 30529d0..01d9ec0 100755
--- a/utils/run_pylint.py
+++ b/utils/run_pylint.py
@@ -82,7 +82,10 @@ def check_file(file_path):
         if fnmatch.fnmatch(os.path.abspath(file_path),
                            '*' + blacklist_pattern):
             return
-    pylint.lint.Run(pylint_base_opts + [file_path])
+    if pylint_version >= 0.21:
+        pylint.lint.Run(pylint_base_opts + [file_path], exit=False)
+    else:
+        pylint.lint.Run(pylint_base_opts + [file_path])
 
 
 def visit(arg, dirname, filenames):
-- 
1.7.5.4

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to