[Python-checkins] r78799 - python/branches/py3k/Lib/ntpath.py

florent.xicluna python-checkins at python.org
Mon Mar 8 15:44:41 CET 2010


Author: florent.xicluna
Date: Mon Mar  8 15:44:41 2010
New Revision: 78799

Log:
Fix ntpath abspath to deal with bytes.


Modified:
   python/branches/py3k/Lib/ntpath.py

Modified: python/branches/py3k/Lib/ntpath.py
==============================================================================
--- python/branches/py3k/Lib/ntpath.py	(original)
+++ python/branches/py3k/Lib/ntpath.py	Mon Mar  8 15:44:41 2010
@@ -561,6 +561,8 @@
                 path = _getfullpathname(path)
             except WindowsError:
                 pass # Bad path - return unchanged.
+        elif isinstance(path, bytes):
+            path = os.getcwdb()
         else:
             path = os.getcwd()
         return normpath(path)


More information about the Python-checkins mailing list