Skip to content

Commit ce8e1be

Browse files
committed
Improve stack trace from comment...
#424 (comment)
1 parent c18b948 commit ce8e1be

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

planemo/galaxy_test/structures.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
"sh run_tests.sh $COMMON_STARTUP_ARGS --report_file %s %s %s %s"
1515
)
1616

17+
NO_STRUCTURED_FILE = (
18+
"Warning: Problem with target Galaxy, it did not "
19+
"produce a structured test results file [%s] - summary "
20+
"information and planemo reports will be incorrect."
21+
)
22+
1723

1824
class GalaxyTestCommand(object):
1925

@@ -60,11 +66,8 @@ class StructuredData(object):
6066

6167
def __init__(self, json_path):
6268
self.json_path = json_path
63-
if not os.path.exists(json_path):
64-
error("Warning: Problem with target Galaxy, it did not "
65-
"produce a structured test results files - summary "
66-
"information and planemo reports will be incorrect."
67-
)
69+
if not json_path or not os.path.exists(json_path):
70+
error(NO_STRUCTURED_FILE % json_path)
6871
else:
6972
try:
7073
with open(json_path, "r") as output_json_f:

0 commit comments

Comments
 (0)