From: <lee...@us...> - 2009-10-07 16:03:19
|
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. |