diff options
author | Tibor Frank <tifrank@cisco.com> | 2021-06-02 12:38:30 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2021-06-02 10:40:18 +0000 |
commit | c9f414f7d4731a76ee82136ea0649535f63dbfb1 (patch) | |
tree | 295d8841fdd35caf5fbbe3d56b9e5b8fed631983 | |
parent | 903ba797c966aef0841bf99e8e13c06e7468bbd2 (diff) |
PAL: Fix plot_ndrpdr_box_name
- if there are no values, put warning to the log.
Change-Id: Ibea99e3f4962684afefa572c46bcca157b8ab3cf
Signed-off-by: Tibor Frank <tifrank@cisco.com>
(cherry picked from commit ccae0f8da97bce98aaaa5cc529b20b88a3d58679)
-rw-r--r-- | resources/tools/presentation/generator_plots.py | 6 |
1 files 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"]) |