Windows skel has an issue with this, so if there is an issue, use default path to cache file.

This commit is contained in:
blitzmann
2015-08-21 19:04:42 -04:00
parent cbedf03026
commit cda8dd4c8b

View File

@@ -42,7 +42,12 @@ class GraphFrame(wx.Frame):
try:
import matplotlib as mpl
cache_dir = mpl._get_cachedir()
try:
cache_dir = mpl._get_cachedir()
except:
cache_dir = unicode(os.path.expanduser(os.path.join("~", ".matplotlib")))
cache_file = os.path.join(cache_dir, 'fontList.cache')
if os.access(cache_dir, os.W_OK | os.X_OK) and os.path.isfile(cache_file):
# remove matplotlib font cache, see #234