Revision: 7856
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7856&view=rev
Author: leejjoon
Date: 2009-10-07 16:03:08 +0000 (Wed, 07 Oct 2009)
Log Message:
-----------
fix savefig not to raise an error when file object is given
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/figure.py
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py 2009-10-06 15:53:34 UTC (rev
7855)
+++ trunk/matplotlib/lib/matplotlib/figure.py 2009-10-07 16:03:08 UTC (rev
7856)
@@ -16,7 +16,7 @@
import artist
from artist import Artist, allow_rasterization
from axes import Axes, SubplotBase, subplot_class_factory
-from cbook import flatten, allequal, Stack, iterable
+from cbook import flatten, allequal, Stack, iterable, is_string_like
import _image
import colorbar as cbar
from image import FigureImage
@@ -1038,7 +1038,7 @@
kwargs[key] = rcParams['savefig.%s'%key]
extension = rcParams['savefig.extension']
- if args and '.' not in args[0] and extension != 'auto':
+ if args and is_string_like(args[0]) and '.' not in args[0] and
extension != 'auto':
fname = args[0] + '.' + extension
args = (fname,) + args[1:]
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins