From e807c0f1ad66b6320f0154a6dc8b5f65d74bae9a Mon Sep 17 00:00:00 2001 From: Grzegorz Latosinski Date: Wed, 21 Sep 2022 14:50:25 +0200 Subject: [PATCH] [#37192] graph: Added catching missing plotext module Signed-off-by: Grzegorz Latosinski --- graph.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graph.py b/graph.py index 052e88d..ee3c435 100644 --- a/graph.py +++ b/graph.py @@ -351,7 +351,11 @@ def create_ascii_plot( canvas_color='black', axes_color='black', ticks_color='white'): - import plotext + try: + import plotext + except ImportError: + print('Could not import plotext - please install the module') + return plotext.clear_figure() start = 1 if skipfirst else 0 xdata = xdata[start:]