From a23030f2cfdb4fd42117c4144db58aee7f2aee87 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 6 Oct 2022 17:24:38 +0300 Subject: DEBUG: Collect more info to debug CI/CD --- wqflask/wqflask/views.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 47f13b20..0b0e31c1 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -825,11 +825,19 @@ def __handle_correlation_error__(exc): @app.route("/corr_compute", methods=('POST',)) def corr_compute_page(): + import subprocess + from gn3.settings import CORRELATION_COMMAND try: correlation_results = compute_correlation( request.form, compute_all=True) except WrongCorrelationType as exc: return __handle_correlation_error__(exc) + except subprocess.CalledProcessError as cpe: + actual_command = ( + os.readlink(CORRELATION_COMMAND) + if os.path.islink(CORRELATION_COMMAND) + else CORRELATION_COMMAND) + raise Exception(command_list, actual_command, cpe.stdout) from cpe correlation_results = set_template_vars(request.form, correlation_results) return render_template("correlation_page.html", **correlation_results) -- cgit v1.2.3