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 5883040 commit 412ca06Copy full SHA for 412ca06
lib/matplotlib/__init__.py
@@ -547,15 +547,16 @@ def _get_config_or_cache_dir(xdg_base):
547
p = os.path.join(h, '.matplotlib')
548
if (sys.platform.startswith('linux') and
549
not os.path.exists(p)):
550
- p = _get_xdg_config_dir()
+ p = os.path.join(xdg_base, 'matplotlib')
551
552
if os.path.exists(p):
553
if not _is_writable_dir(p):
554
return _create_tmp_config_dir()
555
else:
556
- if not _is_writable_dir(h):
+ try:
557
+ mkdirs(p)
558
+ except OSError:
559
- mkdirs(p)
560
561
return p
562
0 commit comments