diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-08 11:32:58 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-08 11:32:58 +0200 |
commit | 5b32a821bf1e0ce81646f6d9d19aec4b8e744f64 (patch) | |
tree | 887d7a7c7d8e9608e33b2349a2cd69f266223690 /Lib/os.py | |
parent | e1d00f1d9aed88b910e2fef41d8a270821365e96 (diff) | |
download | cpython-5b32a821bf1e0ce81646f6d9d19aec4b8e744f64.tar.gz |
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
@@ -146,7 +146,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) |