Commit 3404000f authored by Jameson Rollins's avatar Jameson Rollins

cli: better error handling for matplotlib import errors

actually fail if plots are requested but can't be generated.
parent 738a8ba8
......@@ -202,9 +202,10 @@ def main():
from matplotlib import pyplot as plt
except ImportError as e:
parser.exit(5, f"ImportError: {e}\n")
except RuntimeError:
logger.warning("no display, plotting disabled.")
args.plot = False
parser.exit(10, "Could not open display for plotting.\n")
if args.range:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment