From 2bd8b22b6de76851a7e36dc4a92d20930335ff57 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 13 Feb 2015 12:02:05 +0200 Subject: Issue #21840: Fixed expanding unicode variables of form $var in posixpath.expandvars(). Fixed all os.path implementations on unicode-disabled builds. --- Lib/macpath.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lib/macpath.py') diff --git a/Lib/macpath.py b/Lib/macpath.py index c31bdaade1..9ebd83cf90 100644 --- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -5,6 +5,7 @@ import warnings from stat import * import genericpath from genericpath import * +from genericpath import _unicode __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", @@ -186,7 +187,7 @@ def walk(top, func, arg): def abspath(path): """Return an absolute path.""" if not isabs(path): - if isinstance(path, unicode): + if isinstance(path, _unicode): cwd = os.getcwdu() else: cwd = os.getcwd() -- cgit v1.2.1