From 5d7db92735e52229b5ae73f1d2b0b505a69e0298 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 12 Oct 2015 11:49:28 +0100 Subject: [PATCH] Add verbose logging to galaxy test output handling problems. --- planemo/cli.py | 5 ++++- planemo/galaxy_test/actions.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/planemo/cli.py b/planemo/cli.py index 04377bbee..12967ac33 100644 --- a/planemo/cli.py +++ b/planemo/cli.py @@ -1,5 +1,6 @@ import os import sys +import traceback import click @@ -44,10 +45,12 @@ def log(self, msg, *args): msg %= args click.echo(msg, file=sys.stderr) - def vlog(self, msg, *args): + def vlog(self, msg, *args, **kwds): """Logs a message to stderr only if verbose is enabled.""" if self.verbose: self.log(msg, *args) + if kwds.get("exception", False): + traceback.print_exc(file=sys.stderr) @property def workspace(self): diff --git a/planemo/galaxy_test/actions.py b/planemo/galaxy_test/actions.py index 305b8bcfd..e514883f1 100644 --- a/planemo/galaxy_test/actions.py +++ b/planemo/galaxy_test/actions.py @@ -92,7 +92,7 @@ def run_in_config(ctx, config, **kwds): handle.write(build_report.build_report(test_data, report_type=kw_name)) except Exception: - pass + ctx.vlog("Problem producing test output.", exception=True) __handle_summary( test_results,