[Checkins] SVN: lovely.recipe/trunk/ - fixed os error if a path already esists

Juergen Kartnaller juergen at kartnaller.at
Thu Apr 24 04:45:41 EDT 2008


Log message for revision 85692:
  - fixed os error if a path already esists
  

Changed:
  U   lovely.recipe/trunk/CHANGES.txt
  U   lovely.recipe/trunk/setup.py
  U   lovely.recipe/trunk/src/lovely/recipe/fs/mkfile.py

-=-
Modified: lovely.recipe/trunk/CHANGES.txt
===================================================================
--- lovely.recipe/trunk/CHANGES.txt	2008-04-24 08:10:21 UTC (rev 85691)
+++ lovely.recipe/trunk/CHANGES.txt	2008-04-24 08:45:40 UTC (rev 85692)
@@ -8,6 +8,11 @@
 BIG TODO: add tests for lovely.recipe.zeo and lovely.recipe.zope to test and
           to show for what this all is for.
 
+2008/04/24 0.3.1b4:
+===================
+
+- fixed os error if a path already esists
+
 2008/04/24 0.3.1b3:
 ===================
 

Modified: lovely.recipe/trunk/setup.py
===================================================================
--- lovely.recipe/trunk/setup.py	2008-04-24 08:10:21 UTC (rev 85691)
+++ lovely.recipe/trunk/setup.py	2008-04-24 08:45:40 UTC (rev 85692)
@@ -13,7 +13,7 @@
 
 setup (
     name='lovely.recipe',
-    version='0.3.1b3',
+    version='0.3.1b4',
     author = "Lovely Systems",
     author_email = "office at lovelysystems.com",
     license = "ZPL 2.1",

Modified: lovely.recipe/trunk/src/lovely/recipe/fs/mkfile.py
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/fs/mkfile.py	2008-04-24 08:10:21 UTC (rev 85691)
+++ lovely.recipe/trunk/src/lovely/recipe/fs/mkfile.py	2008-04-24 08:45:40 UTC (rev 85692)
@@ -26,9 +26,11 @@
     def install(self):
         path = self.options['path']
         if self.createPath:
-            logging.getLogger(self.name).info(
-                'Creating directory %s', os.path.dirname(self.options['path']))
-            os.makedirs(os.path.dirname(self.options['path']))
+            dirname = os.path.dirname(self.options['path'])
+            if not os.path.isdir(dirname):
+                logging.getLogger(self.name).info(
+                    'Creating directory %s', dirname)
+                os.makedirs(dirname)
         f = file(path, 'w')
         logging.getLogger(self.name).info(
             'Writing file %s', path)



More information about the Checkins mailing list