[Checkins] SVN: z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py Rename ``path`` option to ``paths``.

Uli Fouquet uli at gnufix.de
Wed Aug 19 08:50:33 EDT 2009


Log message for revision 102946:
  Rename ``path`` option to ``paths``.
  

Changed:
  U   z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py

-=-
Modified: z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py
===================================================================
--- z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py	2009-08-19 12:45:17 UTC (rev 102945)
+++ z3c.recipe.mkdir/trunk/z3c/recipe/mkdir/__init__.py	2009-08-19 12:50:32 UTC (rev 102946)
@@ -1,33 +1,40 @@
 import logging
 import os
+import re
+import stat
 import zc.buildout
 
-
 class Recipe:
-
     def __init__(self, buildout, name, options):
         self.buildout=buildout
         self.name=name
         self.options=options
         self.logger=logging.getLogger(self.name)
 
-        path = None
-        if "path" in options:
-            path = options["path"]
+        paths = None
+        
+        if 'path' in options.keys():
+            self.logger.warn(
+                "Use of 'path' option is deprectated. Use 'paths' instead.")
+            paths = options['path']
+
+        if "paths" in options:
+            paths = options["paths"]
         else:
-            path = os.path.join(
+            paths = os.path.join(
                 buildout['buildout']['parts-directory'], name)
-        path = [x.strip() for x in path.split('\n')]
-        path = [os.path.abspath(x) for x in path]
-        path = [os.path.normpath(x) for x in path]
-        self.path = path
+        paths = [x.strip() for x in paths.split('\n')]
+        paths = [os.path.abspath(x) for x in paths]
+        paths = [os.path.normpath(x) for x in paths]
+        self.paths = paths
 
     def install(self):
-        for path in self.path:
+        for path in self.paths:
             self.createIntermediatePaths(path)
             self.options.created(path)
         return self.options.created()
 
+
     def update(self):
         return self.install()
 



More information about the Checkins mailing list