Skip to content

Commit 81639a1

Browse files
committed
matplotlib: _is_writable_dir checks that it is a directory.
1 parent 4f55a27 commit 81639a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def _is_writable_dir(p):
217217
p + '' # test is string like
218218
except TypeError:
219219
return False
220-
return os.access(p, os.W_OK)
220+
return os.access(p, os.W_OK) and os.path.isdir(p)
221221

222222
class Verbose:
223223
"""

0 commit comments

Comments
 (0)