Revision: 7367
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7367&view=rev
Author:   jdh2358
Date:     2009-08-05 14:44:18 +0000 (Wed, 05 Aug 2009)

Log Message:
-----------
make urllib quote python2.4 compliant

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

Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py    2009-08-05 14:39:36 UTC (rev 
7366)
+++ trunk/matplotlib/lib/matplotlib/cbook.py    2009-08-05 14:44:18 UTC (rev 
7367)
@@ -488,8 +488,16 @@
         get_sample_data.processor = _CacheProcessor(cachedir)
         get_sample_data.opener = 
urllib2.build_opener(get_sample_data.processor)
 
+
+    # quote is not in python2.4, so check for it and get it from
+    # urllib if it is not available
+    quote = getattr(urllib2, 'quote', None)
+    if quote is None:
+        import urllib
+        quote = urllib.quote
+
     url = 
'http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/' + \
-        urllib2.quote(fname)
+        quote(fname)
     response = get_sample_data.opener.open(url)
     if asfileobj:
         return response


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to