[Erp5-report] r33331 luke - /erp5/trunk/buildout/local-eggs/erp5.recipe.standaloneinstance/...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 3 15:29:00 CET 2010


Author: luke
Date: Wed Mar  3 15:29:00 2010
New Revision: 33331

URL: http://svn.erp5.org?rev=33331&view=rev
Log:
 - in r33257 luke used old version of bt5-path parsing, without comma support

Modified:
    erp5/trunk/buildout/local-eggs/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/create_erp5_instance.py

Modified: erp5/trunk/buildout/local-eggs/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/create_erp5_instance.py
URL: http://svn.erp5.org/erp5/trunk/buildout/local-eggs/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/create_erp5_instance.py?rev=33331&r1=33330&r2=33331&view=diff
==============================================================================
--- erp5/trunk/buildout/local-eggs/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/create_erp5_instance.py [utf8] (original)
+++ erp5/trunk/buildout/local-eggs/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/create_erp5_instance.py [utf8] Wed Mar  3 15:29:00 2010
@@ -28,7 +28,8 @@
                   default="zope:zope")
 parser.add_option("--bt5-path",
                   dest="bt5_path",
-                  help="Path to folder containing business templates",
+                  help="Path to folder containing business templates. "
+                  "Can be multiple, separated by commas.",
                   default="bt5")
 
 (options, args) = parser.parse_args()
@@ -44,6 +45,7 @@
       unquote(options.erp5_sql_connection_string)
 options.cmf_activity_sql_connection_string =\
       unquote(options.cmf_activity_sql_connection_string)
+
 username, password = options.user_and_pass.split(':')
 
 try:
@@ -89,8 +91,19 @@
 
 # install our business templates
 bt5_list = []
+bt5_path_list = options.bt5_path.split(',')
+
 for arg in args:
-  bt_path = os.path.join(options.bt5_path, arg)
+  bt_path = None
+  for path in bt5_path_list:
+    bt_path = os.path.join(path, arg)
+    if os.path.exists(bt_path):
+      break
+    else:
+      bt_path = None
+  if bt_path is None:
+    raise ValueError('Business Template %s not found in paths %s' % (arg,
+      options.bt5_path))
   installed_bt = portal.portal_templates.getInstalledBusinessTemplate(arg)
   if installed_bt is not None:
     # XXX this way works only for extracted business template, not for




More information about the Erp5-report mailing list