From 1031cc2c8e108a4ea315870892a2476b261596df Mon Sep 17 00:00:00 2001 From: Esko Kokkonen Date: Thu, 5 Apr 2012 16:09:13 +0300 Subject: [PATCH] Change error messages for matplotlib --- emerge-timer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/emerge-timer.py b/emerge-timer.py index 359beb0..b12b8c4 100755 --- a/emerge-timer.py +++ b/emerge-timer.py @@ -623,11 +623,13 @@ if __name__ == "__main__": try: import matplotlib.pyplot as plt matplotWorking = True - except Exception: - print "Cannot initialize matplotlib!" - print "Check that you have properly installet matplotlib." + except ImportError: + print(RED("Cannot initialize matplotlib!")) + print(RED("Check that you have properly installed matplotlib.\n")) matplotWorking = False + sys.argv.pop(sys.argv.index(arg)) + if arg == "--no-color": green_start = "" color_stop = "" -- 2.44.0