changeset 225:4ea2d2599dd4

trap plot errors better
author catherine@Elli.myhome.westell.com
date Sat, 14 Feb 2009 23:22:01 -0500
parents 582c84365f6a
children 6701c3f097f9
files sqlpython/plothandler.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/plothandler.py	Tue Feb 03 17:24:28 2009 -0500
+++ b/sqlpython/plothandler.py	Sat Feb 14 23:22:01 2009 -0500
@@ -86,4 +86,9 @@
 except ImportError:
     class Plot(object):
         def __init__(self, *args, **kwargs):
-            raise ImportError, 'Must install python-matplotlib and pytyon-numpy to draw plots'
\ No newline at end of file
+            raise ImportError, 'Must install python-matplotlib and pytyon-numpy to draw plots'
+
+except Exception, e:
+    class Plot(object):
+        def __init__(self, *args, **kwargs):
+            raise ImportError, 'There was a problem attempting to use plots:\n%s' % str(e)