[Checkins] SVN: zc.recipe.filestorage/trunk/zc/recipe/filestorage/__init__.py added shared blob dir

Christian Zagrodnick cz at gocept.com
Mon Jun 25 02:55:53 EDT 2007


Log message for revision 77028:
  added shared blob dir

Changed:
  U   zc.recipe.filestorage/trunk/zc/recipe/filestorage/__init__.py

-=-
Modified: zc.recipe.filestorage/trunk/zc/recipe/filestorage/__init__.py
===================================================================
--- zc.recipe.filestorage/trunk/zc/recipe/filestorage/__init__.py	2007-06-25 05:06:01 UTC (rev 77027)
+++ zc.recipe.filestorage/trunk/zc/recipe/filestorage/__init__.py	2007-06-25 06:55:52 UTC (rev 77028)
@@ -33,17 +33,20 @@
             self.make_part = False
         options['path'] = path
 
-        blob_dir = options.get('blob-dir')
-        if blob_dir is None:
+        blob_dir = options.get('blob-dir', '')
+        if not blob_dir:
             template = plain_template
         else:
             template = blob_template
             blob_dir = os.path.join(buildout['buildout']['directory'],
                                     blob_dir)
         options['blob-dir'] = blob_dir
+        shared = options.get('shared-blob-dir', 'no')
 
-        options['zconfig'] = template % {'path': path,
-                                         'blob-dir': blob_dir}
+        options['zconfig'] = template % dict(
+            path=path,
+            blob_dir=blob_dir,
+            shared=shared)
 
     def install(self):
         if self.make_part:
@@ -66,7 +69,8 @@
 blob_template = """\
 <zodb>
   <blobstorage>
-    blob-dir %(blob-dir)s
+    blob-dir %(blob_dir)s
+    shared-blob-dir %(shared)s
     <filestorage>
       path %(path)s
     </filestorage>



More information about the Checkins mailing list