Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: recipe_engine/lint_test.py

Issue 2845023002: [lint] Fix lint to not raise an exception at the end. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/lint_test.py
diff --git a/recipe_engine/lint_test.py b/recipe_engine/lint_test.py
index 38772e624944bb6245fe16761260948f5da68ce6..07ca34b79d5706026f66c511f3f2d745855fb023 100755
--- a/recipe_engine/lint_test.py
+++ b/recipe_engine/lint_test.py
@@ -18,6 +18,7 @@ import types
MODULES_WHITELIST = [
+ r'ast',
r'base64',
r'collections',
r'contextlib',
@@ -34,14 +35,6 @@ MODULES_WHITELIST = [
]
-class ImportViolationError(Exception):
- pass
-
-
-class TestFailure(Exception):
- pass
-
-
def ImportsTest(recipe_path, recipe_name, whitelist, universe_view):
"""Tests that recipe_name only uses allowed imports.
@@ -89,4 +82,7 @@ def main(package_deps, args):
ImportsTest(recipe_path, recipe_name, whitelist, universe_view))
if errors:
- raise TestFailure('\n'.join(map(str, errors)))
+ for line in map(str, errors):
+ print line
+ return 1
+ return 0
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698