8000 mkdirs throws OSError · matplotlib/matplotlib@a36436d · GitHub
[go: up one dir, main page]

Skip to content

Commit a36436d

Browse files
committed
mkdirs throws OSError
1 parent a8fcb75 commit a36436d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/testing/_conversion_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def ensure_cache_dir(self):
191191
if not os.path.exists(self.cachedir):
192192
try:
193193
cbook.mkdirs(self.cachedir)
194-
except IOError as e:
194+
except OSError as e:
195195
raise _CacheError("Error creating cache directory %s: %s"
196196
% (self.cachedir, str(e)))
197197
if not os.access(self.cachedir, os.W_OK):

lib/matplotlib/tests/test_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_cache_default_dir():
103103

104104
@raises(_CacheError)
105105
@mock.patch('matplotlib.testing._conversion_cache.cbook.mkdirs',
106-
side_effect=IOError)
106+
side_effect=OSError)
107107
def test_cache_mkdir_error(mkdirs):
108108
tmpdir = tempfile.mkdtemp()
109109
try:

0 commit comments

Comments
 (0)
0