From 4cd49e1c6076bd9ef2d18480d893038822668262 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 5 Apr 2016 10:28:48 -0700 Subject: 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 --- PRESUBMIT.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3