8000 - only do it on Windows and Python 2.x, as per Michael's comment · hanna2/matplotlib@dd7f7c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit dd7f7c0

Browse files
committed
- only do it on Windows and Python 2.x, as per Michael's comment
1 parent 616f473 commit dd7f7c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,10 @@ def _get_home():
523523
http://mail.python.org/pipermail/python-list/2005-February/325395.html
524524
"""
525525
try:
526-
path = os.path.expanduser(b"~").decode(sys.getfilesystemencoding())
526+
if six.PY2 and sys.platform == 'win32':
527+
path = os.path.expanduser(b"~").decode(sys.getfilesystemencoding())
528+
else:
529+
path = os.path.expanduser("~")
527530
except ImportError:
528531
# This happens on Google App Engine (pwd module is not present).
529532
pass

0 commit comments

Comments
 (0)
0