diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-08 14:44:41 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-08 14:44:41 (GMT) |
commit | ad8c5ca4e7e274163447a33615e02edf1d64d87a (patch) | |
tree | 1439e407aeb08cf197b43ede738dedd1af709a01 /Lib/ntpath.py | |
parent | 998171f0d72b270bd578ee9d6fc4937f0cc9776b (diff) | |
download | cpython-ad8c5ca4e7e274163447a33615e02edf1d64d87a.zip cpython-ad8c5ca4e7e274163447a33615e02edf1d64d87a.tar.gz cpython-ad8c5ca4e7e274163447a33615e02edf1d64d87a.tar.bz2 |
Fix ntpath abspath to deal with bytes.
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index d16b664..8d50294 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -561,6 +561,8 @@ else: # use native Windows method on Windows path = _getfullpathname(path) except WindowsError: pass # Bad path - return unchanged. + elif isinstance(path, bytes): + path = os.getcwdb() else: path = os.getcwd() return normpath(path) |