Revision: 7164
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7164&view=rev
Author:   efiring
Date:     2009-05-29 18:24:46 +0000 (Fri, 29 May 2009)

Log Message:
-----------
Make rcsetup validate_color handle non-string input

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/rcsetup.py

Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py  2009-05-29 15:59:47 UTC (rev 
7163)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py  2009-05-29 18:24:46 UTC (rev 
7164)
@@ -177,8 +177,11 @@
 
 def validate_color(s):
     'return a valid color arg'
-    if s.lower() == 'none':
-        return 'None'
+    try:
+        if s.lower() == 'none':
+            return 'None'
+    except AttributeError:
+        pass
     if is_color_like(s):
         return s
     stmp = '#' + s


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to