Changed os.mkdir to os.makedirs to make it support nested directory creation.

fixes issue GH-259.
Signed-off-by: default avatarBernard `Guyzmo` Pratz <guyzmo+github@m0g.net>
parent 1c7a070a
...@@ -392,10 +392,8 @@ class Buildout(DictMixin): ...@@ -392,10 +392,8 @@ class Buildout(DictMixin):
if cache: if cache:
cache = os.path.join(options['directory'], cache) cache = os.path.join(options['directory'], cache)
if not os.path.exists(cache): if not os.path.exists(cache):
# Note: os.mkdir only creates the dir if the parent
# exists. This is the way we want it.
self._logger.info('Creating directory %r.', cache) self._logger.info('Creating directory %r.', cache)
os.mkdir(cache) os.makedirs(cache)
if download_cache: if download_cache:
# Actually, we want to use a subdirectory in there called 'dist'. # Actually, we want to use a subdirectory in there called 'dist'.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment