]> git.itanic.dy.fi Git - emerge-timer/commitdiff
Change error messages for matplotlib
authorEsko Kokkonen <esko.kokkonen@gmail.com>
Thu, 5 Apr 2012 13:09:13 +0000 (16:09 +0300)
committerEsko Kokkonen <esko.kokkonen@gmail.com>
Thu, 5 Apr 2012 13:09:13 +0000 (16:09 +0300)
emerge-timer.py

index 359beb0e493911f6f08a6ffc687446b1654d4c56..b12b8c4eaf9e741e2f5f1db5c81128c22e782d95 100755 (executable)
@@ -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 = ""