diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-08 09:38:45 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-08 09:38:45 (GMT) |
commit | 1a03ac832dae04a4a8044f59a894c579fec4e439 (patch) | |
tree | 62e655c1a3a7f5b95dec8ac57f678cfb52c5947e /Lib/os.py | |
parent | 15738427f612a447475254d0ac26ce4b4bb9ef2e (diff) | |
parent | f6fb3a3206dcd27a68f5717c08d83ee8f1466545 (diff) | |
download | cpython-1a03ac832dae04a4a8044f59a894c579fec4e439.zip cpython-1a03ac832dae04a4a8044f59a894c579fec4e439.tar.gz cpython-1a03ac832dae04a4a8044f59a894c579fec4e439.tar.bz2 |
Issue #15845: Fix comparison between bytes and string.
Patch by Alessandro Moura.
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -236,7 +236,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) |