From 598c18f60a24c4c9c265fe875bb12f54d5ab38b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=FCrgen=20kartnaller?= Date: Wed, 16 Jul 2008 16:02:48 +0000 Subject: [PATCH] - make sure we don't fail if the directory to create already exists --- CHANGES.txt | 5 +++++ setup.py | 2 +- src/lovely/recipe/fs/mkdir.py | 7 ++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 84e8cd8..2245561 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,11 @@ After BIG TODO: add tests for lovely.recipe.zeo and lovely.recipe.zope to test and to show what this all is for. +2008/07/16 0.3.1b7 +================== + +- make sure we don't fail if the directory to create already exists + 2008/07/16 0.3.1b6 ================== diff --git a/setup.py b/setup.py index f447f3e..3a0d836 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup ( name='lovely.recipe', - version='0.3.1b6', + version='0.3.1b7', author = "Lovely Systems", author_email = "office@lovelysystems.com", license = "ZPL 2.1", diff --git a/src/lovely/recipe/fs/mkdir.py b/src/lovely/recipe/fs/mkdir.py index b34e7af..fe43a4f 100644 --- a/src/lovely/recipe/fs/mkdir.py +++ b/src/lovely/recipe/fs/mkdir.py @@ -31,9 +31,10 @@ def install(self): path, dirname) raise zc.buildout.UserError('Invalid Path') - logging.getLogger(self.name).info( - 'Creating directory %s', self.originalPath) - os.mkdir(path) + if not os.path.isdir(path): + logging.getLogger(self.name).info( + 'Creating directory %s', self.originalPath) + os.mkdir(path) return () def update(self):