Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index 4ca213bb07a28538ef9014772f31db9b8779aca9..2c176fc06c2b637ebcc17e70debe4d12ee54128b 100644 |
--- a/PRESUBMIT.py |
+++ b/PRESUBMIT.py |
@@ -58,9 +58,13 @@ def RunPylint(input_api, output_api): |
files.remove('cpplint.py') |
try: |
proc = input_api.subprocess.Popen(['pylint', '-E'] + files) |
- except WindowsError: |
- # It's windows, give up. |
- return [] |
+ except OSError: |
+ if input_api.platform == 'win32': |
+ # It's windows, give up. |
+ return [] |
+ else: |
+ return [output_api.PresubmitError( |
+ 'Please install pylint with "easy_install pylint"')] |
proc.communicate() |
if proc.returncode: |
return [output_api.PresubmitError('Fix pylint errors first.')] |