From c3bfa5050441f3bea9daa0468aef7c267eda2da5 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 27 Apr 2016 16:06:14 -0400 Subject: [PATCH] Improved error handling in cwltest.py. --- cwltool/cwltest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cwltool/cwltest.py b/cwltool/cwltest.py index 5cdb90426..c4441bb49 100755 --- a/cwltool/cwltest.py +++ b/cwltool/cwltest.py @@ -87,6 +87,8 @@ def run_test(args, i, t): # type: (argparse.Namespace, Any, Dict[str,str]) -> i outstr = subprocess.check_output(test_command) out = yaml.load(outstr) + if not isinstance(out, dict): + raise ValueError("Non-dict value parsed from output string.") except ValueError as v: _logger.error(str(v)) _logger.error(outstr)