X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_plots.py;h=d77ac7bab5acf08c95f638b8dbaa505115e5b890;hp=747c3a2877585d466bfc82eae18b38490281a450;hb=4343381c7e244d2e39067c3ece4c8d6929c20916;hpb=e408e562b213d382e7cfde74d0a557f64d5c6be2 diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index 747c3a2877..d77ac7bab5 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -1125,13 +1125,16 @@ def plot_service_density_heatmap(plot, input_data): nr=None, mean=None, stdev=None) - if plot["include-tests"] == "MRR": - result = test["result"]["receive-rate"].avg - elif plot["include-tests"] == "PDR": - result = test["throughput"]["PDR"]["LOWER"] - elif plot["include-tests"] == "NDR": - result = test["throughput"]["NDR"]["LOWER"] - else: + try: + if plot["include-tests"] == "MRR": + result = test["result"]["receive-rate"].avg + elif plot["include-tests"] == "PDR": + result = test["throughput"]["PDR"]["LOWER"] + elif plot["include-tests"] == "NDR": + result = test["throughput"]["NDR"]["LOWER"] + else: + result = None + except TypeError: result = None if result: