diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-08 09:36:54 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-08 09:36:54 (GMT) |
commit | f6fb3a3206dcd27a68f5717c08d83ee8f1466545 (patch) | |
tree | fdc7b8bbfbfd1cb017f04a191eff13c646bd3cba /Lib/os.py | |
parent | a2ad5c3ad1bbf6d2088ff3ab2eb3bba51d096cc2 (diff) | |
parent | 4ab23bfbeb94f1ade79def3d096ed2daaea6bc79 (diff) | |
download | cpython-f6fb3a3206dcd27a68f5717c08d83ee8f1466545.zip cpython-f6fb3a3206dcd27a68f5717c08d83ee8f1466545.tar.gz cpython-f6fb3a3206dcd27a68f5717c08d83ee8f1466545.tar.bz2 |
Issue #15845: Fix comparison between bytes and string.
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -260,7 +260,10 @@ def makedirs(name, mode=0o777, exist_ok=False): # be happy if someone already created the path if e.errno != errno.EEXIST: raise - if tail == curdir: # xxx/newdir/. exists if xxx/newdir exists + cdir = curdir + if isinstance(tail, bytes): + cdir = bytes(curdir, 'ASCII') + if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: mkdir(name, mode) |