Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0888de

Browse files
committed
Don't use the font cache on TRAVIS
1 parent 207469f commit f0888de

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/matplotlib/font_manager.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,12 +1324,15 @@ def findfont(prop, fontext='ttf'):
13241324
return result
13251325

13261326
else:
1327-
cachedir = get_cachedir()
1328-
if cachedir is not None:
1329-
if sys.version_info[0] >= 3:
1330-
_fmcache = os.path.join(cachedir, 'fontList.py3k.cache')
1331-
else:
1332-
_fmcache = os.path.join(cachedir, 'fontList.cache')
1327+
if not 'TRAVIS' in os.environ:
1328+
cachedir = get_cachedir()
1329+
if cachedir is not None:
1330+
if sys.version_info[0] >= 3:
1331+
_fmcache = os.path.join(cachedir, 'fontList.py3k.cache')
1332+
else:
1333+
_fmcache = os.path.join(cachedir, 'fontList.cache')
1334+
else:
1335+
_fmcache = None
13331336

13341337
fontManager = None
13351338

0 commit comments

Comments
 (0)