File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Original file line number Diff line number Diff line change @@ -642,7 +642,10 @@ def matplotlib_fname():
642
642
WARNING: Old rc filename ".matplotlibrc" found in working dir
643
643
and and renamed to new default rc file name "matplotlibrc"
644
644
(no leading"dot"). """ , file = sys .stderr )
645
- shutil .move ('.matplotlibrc' , 'matplotlibrc' )
645
+ try :
646
+ shutil .move ('.matplotlibrc' , 'matplotlibrc' )
647
+ except IOError as e :
648
+ print ("WARNING: File could not be renamed: %s" % e , file = sys .stderr )
646
649
647
650
home = get_home ()
648
651
oldname = os .path .join ( home , '.matplotlibrc' )
@@ -653,7 +656,10 @@ def matplotlib_fname():
653
656
WARNING: Old rc filename "%s" found and renamed to
654
657
new default rc file name "%s".""" % (oldname , newname ), file = sys .stderr )
655
658
656
- shutil .move (oldname , newname )
659
+ try :
660
+ shutil .move (oldname , newname )
661
+ except IOError as e :
662
+ print ("WARNING: File could not be renamed: %s" % e , file = sys .stderr )
657
663
658
664
659
665
fname = os .path .join ( os .getcwd (), 'matplotlibrc' )
Original file line number Diff line number Diff line change @@ -102,7 +102,10 @@ class TexManager:
102
102
WARNING: found a TeX cache dir in the deprecated location "%s".
103
103
Moving it to the new default location "%s".""" % (oldcache , texcache ),
104
104
file = sys .stderr )
105
- shutil .move (oldcache , texcache )
105
+ try :
106
+ shutil .move (oldcache , texcache )
107
+ except IOError as e :
108
+ print ("WARNING: File could not be renamed: %s" % e , file = sys .stderr )
106
109
mkdirs (texcache )
107
110
108
111
_dvipng_hack_alpha = None
You can’t perform that action at this time.
0 commit comments