summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-08 14:44:41 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-08 14:44:41 (GMT)
commitad8c5ca4e7e274163447a33615e02edf1d64d87a (patch)
tree1439e407aeb08cf197b43ede738dedd1af709a01
parent998171f0d72b270bd578ee9d6fc4937f0cc9776b (diff)
downloadcpython-ad8c5ca4e7e274163447a33615e02edf1d64d87a.zip
cpython-ad8c5ca4e7e274163447a33615e02edf1d64d87a.tar.gz
cpython-ad8c5ca4e7e274163447a33615e02edf1d64d87a.tar.bz2
Fix ntpath abspath to deal with bytes.
-rw-r--r--Lib/ntpath.py2
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)