File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -569,7 +569,6 @@ def _get_config_or_cache_dir(xdg_base):
569
569
if h is not None :
570
570
p = os .path .join (h , '.matplotlib' )
571
571
if (sys .platform .startswith ('linux' ) and
572
- not os .path .exists (p ) and
573
572
xdg_base is not None ):
574
573
p = os .path .join (xdg_base , 'matplotlib' )
575
574
@@ -744,8 +743,8 @@ def matplotlib_fname():
744
743
home = get_home ()
745
744
if (sys .platform .startswith ('linux' ) and
746
745
home is not None and
747
- fname == os .path .join (
748
- home , '.matplotlib' , 'matplotlibrc' )):
746
+ os . path . exists ( os .path .join (
747
+ home , '.matplotlib' , 'matplotlibrc' ))) :
749
748
warnings .warn (
750
749
"Found matplotlib configuration in ~/.matplotlib/. "
751
750
"To conform with the XDG base directory standard, "
@@ -754,6 +753,8 @@ def matplotlib_fname():
754
753
"Please move your configuration there to ensure that "
755
754
"matplotlib will continue to find it in the future." %
756
755
_get_xdg_config_dir ())
756
+ return os .path .join (
757
+ home , '.matplotlib' , 'matplotlibrc' )
757
758
return fname
758
759
759
760
path = get_data_path () # guaranteed to exist or raise
You can’t perform that action at this time.
0 commit comments