summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2016-06-04 20:47:39 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2016-06-04 20:47:39 (GMT)
commit228c636908bda8a6b20b0f6930655fbaedc4ebad (patch)
treef91930ec2dfe5fdb8525ec90a3f2226d218ca686 /Lib/os.py
parentdb780cffc887fbf4c4fb9452fc6dc7a3c722e290 (diff)
downloadcpython-228c636908bda8a6b20b0f6930655fbaedc4ebad.zip
cpython-228c636908bda8a6b20b0f6930655fbaedc4ebad.tar.gz
cpython-228c636908bda8a6b20b0f6930655fbaedc4ebad.tar.bz2
issue27186: fix fsencode/fsdecode and update tests; patch by Jelle Zijlstra
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/os.py b/Lib/os.py
index e7d089e..56a2f71 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -889,7 +889,7 @@ def _fscodec():
return filename.encode(encoding, errors)
else:
raise TypeError("expected str, bytes or os.PathLike object, not "
- + path_type.__name__)
+ + type(filename).__name__)
def fsdecode(filename):
"""
@@ -905,7 +905,7 @@ def _fscodec():
return filename.decode(encoding, errors)
else:
raise TypeError("expected str, bytes or os.PathLike object, not "
- + path_type.__name__)
+ + type(filename).__name__)
return fsencode, fsdecode