diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-05 10:28:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-05 10:28:48 -0700 |
commit | 4cd49e1c6076bd9ef2d18480d893038822668262 (patch) | |
tree | 5ed4b2985dfa934d26f2fcc8c21ef463f7571c4f | |
parent | 28f97ff783c16f3391384ce97b765ce4eb310ac7 (diff) | |
download | pdfium-4cd49e1c6076bd9ef2d18480d893038822668262.tar.xz |
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
-rw-r--r-- | PRESUBMIT.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 819c4e64fd..111abb03b0 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -50,6 +50,9 @@ def _CheckUnwantedDependencies(input_api, output_api): 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 |