X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_plots.py;h=d77ac7bab5acf08c95f638b8dbaa505115e5b890;hb=9390233c8b3d9176e020976ecdf44eb99c1f58e3;hp=747c3a2877585d466bfc82eae18b38490281a450;hpb=9510e2ca6dbca1ab16b9db8054e9968facf4b699;p=csit.git 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: