From a5196f604c6249683db50d054aea5605349a5d04 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn <frederik.gladhorn@digia.com> Date: Thu, 20 Sep 2012 20:35:21 +0200 Subject: [PATCH] Post message when running qdoc crashes for example. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2de83a6046eeb75dfea27e07119c6eaf918642a0 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> --- git-hooks/qdoc-bot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git-hooks/qdoc-bot.py b/git-hooks/qdoc-bot.py index 801be3d..d001f2c 100755 --- a/git-hooks/qdoc-bot.py +++ b/git-hooks/qdoc-bot.py @@ -250,7 +250,13 @@ def process_event(event_string): cmd_git_reset = ["git", "checkout", event["patchSet"]["revision"], "-b", "tmp"] subprocess.check_call(cmd_git_reset) - output_with_patch = run_qdoc(module_name) + try: + output_with_patch = run_qdoc(module_name) + except subprocess.CalledProcessError, e: + logging.debug("RUNNING QDOC FAILED", e) + msg = "Running command\n " + str(e.cmd) + "\nfailed." + post_review(event, msg, -1) + return -1 #reseting to parent and cleaning (especially needed for docs removal) cmd_git_clean = ["git", "clean", "-fdxq"] -- GitLab