Revision: 4649
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4649&view=rev
Author: dsdale
Date: 2007-12-06 10:32:44 -0800 (Thu, 06 Dec 2007)
Log Message:
-----------
fixed a bug in savefig, saving to a nonexistent directory
would result in a crash in some circumstances. Closes bug
1699614
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/figure.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2007-12-06 18:08:21 UTC (rev 4648)
+++ trunk/matplotlib/CHANGELOG 2007-12-06 18:32:44 UTC (rev 4649)
@@ -1,3 +1,7 @@
+2007-12-06 fixed a bug in savefig, saving to a nonexistent directory
+ would result in a crash in some circumstances. Closes bug
+ 1699614 - DSD
+
2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD
===============================================================
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py 2007-12-06 18:08:21 UTC (rev
4648)
+++ trunk/matplotlib/lib/matplotlib/figure.py 2007-12-06 18:32:44 UTC (rev
4649)
@@ -1,6 +1,7 @@
"""
Figure class -- add docstring here!
"""
+import os
import sys
import numpy as npy
@@ -772,6 +773,9 @@
format - one of the file extensions supported by the active backend.
"""
+ path = os.path.abspath(os.path.split(args[0])[0])
+ if not os.access(path, os.W_OK):
+ raise IOError('%s is not a writeable directory'%path)
for key in ('dpi', 'facecolor', 'edgecolor'):
if not kwargs.has_key(key):
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins