From ccae0f8da97bce98aaaa5cc529b20b88a3d58679 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Wed, 2 Jun 2021 12:38:30 +0200 Subject: PAL: Fix plot_ndrpdr_box_name - if there are no values, put warning to the log. Change-Id: Ibea99e3f4962684afefa572c46bcca157b8ab3cf Signed-off-by: Tibor Frank --- resources/tools/presentation/generator_plots.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index 39b6f9bea4..1d6bbaabf5 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -761,8 +761,10 @@ def plot_ndrpdr_box_name(plot, input_data): hoverinfo=u"y+name" ) ) - data_y_max.append(max(vals)) - + try: + data_y_max.append(max(vals)) + except ValueError as err: + logging.warning(f"No values to use.\n{err!r}") try: # Create plot layout = deepcopy(plot[u"layout"]) -- cgit 1.2.3-korg