Fix macpath to deal with bytes

This commit is contained in:
Florent Xicluna 2010-03-08 12:25:35 +00:00
parent c9c79784cf
commit 19b02d4558

View file

@ -172,7 +172,11 @@ def normpath(s):
def abspath(path):
"""Return an absolute path."""
if not isabs(path):
path = join(os.getcwd(), path)
if isinstance(path, bytes):
cwd = os.getcwdb()
else:
cwd = os.getcwd()
path = join(cwd, path)
return normpath(path)
# realpath is a no-op on systems without islink support