diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-08 12:25:35 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-08 12:25:35 (GMT) |
commit | 19b02d4558515e761755346dd1c119cf6ad55352 (patch) | |
tree | 78c3b81cba24fd47c64dbe924955f442f2debee2 /Lib | |
parent | c9c79784cf675819981e54b9c64a9ec114aff994 (diff) | |
download | cpython-19b02d4558515e761755346dd1c119cf6ad55352.zip cpython-19b02d4558515e761755346dd1c119cf6ad55352.tar.gz cpython-19b02d4558515e761755346dd1c119cf6ad55352.tar.bz2 |
Fix macpath to deal with bytes
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/macpath.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py index c023646..f58a195 100644 --- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -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 |