Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6fda2ab

Browse files
committed
Only decode path strings if it is not already str (in other words, on Python 2 leave str as str instead of converting to unicode).
1 parent e47ad44 commit 6fda2ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ def _get_cachedir():
710710

711711

712712
def _decode_filesystem_path(path):
713-
if isinstance(path, bytes):
713+
if not isinstance(path, str):
714714
return path.decode(sys.getfilesystemencoding())
715715
else:
716716
return path

0 commit comments

Comments
 (0)