__revision__ = "$Id$"
import os
-from distutils.errors import DistutilsFileError
+from types import *
+from distutils.errors import DistutilsFileError, DistutilsInternalError
# cache for by mkpath() -- in addition to cheapening redundant calls,
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
# each directory in the path (the current behaviour), or only announce
# the creation of the whole path? (quite easy to do the latter since