[Python-checkins] CVS: distutils/distutils dir_util.py,1.1,1.2
Greg Ward
python-dev@python.org
Fri, 26 May 2000 18:35:30 -0700
Update of /cvsroot/python/distutils/distutils
In directory slayer.i.sourceforge.net:/tmp/cvs-serv11998
Modified Files:
dir_util.py
Log Message:
'mkpath()' now detects non-string 'name' arguments -- this is a fairly common
bug when adding new code, so I thought I'd make it blow up earlier
than deep in posix.py.
Index: dir_util.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/dir_util.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** dir_util.py 2000/04/04 02:05:59 1.1
--- dir_util.py 2000/05/27 01:35:27 1.2
***************
*** 5,12 ****
# created 2000/04/03, Greg Ward (extracted from util.py)
! __revision__ = "$Id: dir_util.py,v 1.1 2000/04/04 02:05:59 gward Exp $"
import os
! from distutils.errors import DistutilsFileError
--- 5,13 ----
# created 2000/04/03, Greg Ward (extracted from util.py)
! __revision__ = "$Id: dir_util.py,v 1.2 2000/05/27 01:35:27 gward Exp $"
import os
! from types import *
! from distutils.errors import DistutilsFileError, DistutilsInternalError
***************
*** 29,32 ****
--- 30,38 ----
global PATH_CREATED
+
+ # Detect a common bug -- name is None
+ if type(name) is not StringType:
+ raise DistutilsInternalError, \
+ "mkpath: 'name' must be a string (got %s)" % `name`
# XXX what's the better way to handle verbosity? print as we create