From 7bb5860200d14358d06aa0c000814744d768f051 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Wed, 11 Nov 2020 00:40:03 +0100 Subject: [PATCH] bimtester: fix in report creation on empty steps --- src/ifcbimtester/bimtester.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ifcbimtester/bimtester.py b/src/ifcbimtester/bimtester.py index 63496fa175..d4a0a3ae43 100755 --- a/src/ifcbimtester/bimtester.py +++ b/src/ifcbimtester/bimtester.py @@ -107,6 +107,13 @@ def generate_report(adir="."): for scenario in feature["elements"]: steps = [] total_duration = 0 + if len(scenario["steps"]) == 0: + print( + "Scenario '{}' in feature '{}' has no steps. " + "Thus skipped in report." + .format(scenario["name"], feature["name"]) + ) + continue for step in scenario["steps"]: if "result" in step: total_duration += step["result"]["duration"]