Thanks to visit codestin.com Credit goes to github.com
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 b13fc46 commit b3bdf84Copy full SHA for b3bdf84
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