]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #1167716: Support Unicode filenames in mkpath. Fixes #1121494.
authorMartin v. Löwis <martin@v.loewis.de>
Wed, 24 Aug 2005 14:55:42 +0000 (14:55 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Wed, 24 Aug 2005 14:55:42 +0000 (14:55 +0000)
Lib/distutils/dir_util.py
Misc/NEWS

index 7f1450373b5c631e7f4ae7698314d710454b55a0..2248b607cf4e4b79811507da57f4fa03fab85c14 100644 (file)
@@ -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,)
 
index 6d4df5dfed846595a7ac05f6adeb4e68ea9f06ff..2662beb09193d6a009601429f90c02a0c2cdf5ab 100644 (file)
--- 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.