We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d58a2a5 commit a82de5cCopy full SHA for a82de5c
lib/matplotlib/__init__.py
@@ -537,6 +537,7 @@ def _create_tmp_config_dir():
537
"""
538
import getpass
539
import tempfile
540
+ from matplotlib.cbook import mkdirs
541
542
try:
543
tempdir = tempfile.gettempdir()
@@ -547,6 +548,11 @@ def _create_tmp_config_dir():
547
548
tempdir = os.path.join(tempdir, 'matplotlib-%s' % getpass.getuser())
549
os.environ['MPLCONFIGDIR'] = tempdir
550
551
+ try:
552
+ mkdirs(tempdir)
553
+ except OSError:
554
+ pass
555
+
556
return tempdir
557
558
0 commit comments