From: Martin v. Löwis Date: Wed, 24 Aug 2005 14:55:42 +0000 (+0000) Subject: Patch #1167716: Support Unicode filenames in mkpath. Fixes #1121494. X-Git-Tag: v2.4.2c1~77 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=47826f1eba112ee41cca6a4700d4b39a1d2a6010;p=thirdparty%2FPython%2Fcpython.git Patch #1167716: Support Unicode filenames in mkpath. Fixes #1121494. --- diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index 7f1450373b5c..2248b607cf4e 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -31,7 +31,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): global _path_created # Detect a common bug -- name is None - if type(name) is not StringType: + if not isinstance(name, StringTypes): raise DistutilsInternalError, \ "mkpath: 'name' must be a string (got %r)" % (name,) diff --git a/Misc/NEWS b/Misc/NEWS index 6d4df5dfed84..2662beb09193 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -68,6 +68,8 @@ Extension Modules Library ------- +- Bug #1121494: distutils.dir_utils.mkpath now accepts Unicode strings. + - Bug #1178484: Return complete lines from codec stream readers even if there is an exception in later lines, resulting in correct line numbers for decoding errors in source code.