Better error for checkdeps.
If the checkdeps script can not be found the following error will be issued
instead of a stacktrace:
** Presubmit ERRORS **
Unable to run checkdeps, does pdfium/buildtools/checkdeps exist?
BUG=chromium:600043
Review URL: https://codereview.chromium.org/1860803003
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 819c4e6..111abb0 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -50,6 +50,9 @@
import checkdeps
from cpp_checker import CppChecker
from rules import Rule
+ except ImportError:
+ return [output_api.PresubmitError(
+ 'Unable to run checkdeps, does pdfium/buildtools/checkdeps exist?')]
finally:
# Restore sys.path to what it was before.
sys.path = original_sys_path