Index: third_party/closure_compiler/checker.py |
diff --git a/third_party/closure_compiler/checker.py b/third_party/closure_compiler/checker.py |
index 5ae34951f399d68082667aed5c3d1f10d69ebbab..2d48cf70a84f7041c094eac41cfd828755b764e7 100644 |
--- a/third_party/closure_compiler/checker.py |
+++ b/third_party/closure_compiler/checker.py |
@@ -19,7 +19,7 @@ class LineNumber(object): |
class FileCache(object): |
_cache = defaultdict(str) |
- |
+ |
def _read(self, file): |
file = os.path.abspath(file) |
self._cache[file] = self._cache[file] or open(file, "r").read() |
@@ -128,7 +128,6 @@ class Checker(object): |
def _fatal(self, msg): |
Dan Beam
2014/07/29 23:49:08
change to _error, _fatal no longer makes as much s
Vitaly Pavlenko
2014/07/30 00:01:37
Done.
|
print >> sys.stderr, "(FATAL) " + msg |
Dan Beam
2014/07/29 23:49:08
(ERROR)
Vitaly Pavlenko
2014/07/30 00:01:37
Done.
|
self._clean_up() |
- sys.exit(1) |
def _run_command(self, cmd): |
cmd_str = " ".join(cmd) |
@@ -212,11 +211,12 @@ class Checker(object): |
self._debug("Summary: " + errors.pop()) |
output = self._format_errors(map(self._fix_up_error, errors)) |
+ |
if runner_cmd.returncode: |
self._fatal("Error in: " + file + ("\n" + output if output else "")) |
elif output: |
self._debug("Output: " + output) |
- |
+ |
self._clean_up() |
- return runner_cmd.returncode == 0 |
+ return runner_cmd.returncode == 0, output |
Dan Beam
2014/07/29 23:49:08
return runner_cmd.returncode, output
Vitaly Pavlenko
2014/07/30 00:01:37
Done.
|