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):
569569 if h is not None :
570570 p = os .path .join (h , '.matplotlib' )
571571 if (sys .platform .startswith ('linux' ) and
572- not os .path .exists (p ) and
573572 xdg_base is not None ):
574573 p = os .path .join (xdg_base , 'matplotlib' )
575574
@@ -744,8 +743,8 @@ def matplotlib_fname():
744743 home = get_home ()
745744 if (sys .platform .startswith ('linux' ) and
746745 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' ))) :
749748 warnings .warn (
750749 "Found matplotlib configuration in ~/.matplotlib/. "
751750 "To conform with the XDG base directory standard, "
@@ -754,6 +753,8 @@ def matplotlib_fname():
754753 "Please move your configuration there to ensure that "
755754 "matplotlib will continue to find it in the future." %
756755 _get_xdg_config_dir ())
756+ return os .path .join (
757+ home , '.matplotlib' , 'matplotlibrc' )
757758 return fname
758759
759760 path = get_data_path () # guaranteed to exist or raise
You can’t perform that action at this time.
0 commit comments