[Erp5-report] r45833 luke - /erp5/trunk/utils/slapos.recipe.erp5/src/slapos/recipe/erp5/

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 4 15:46:27 CEST 2011


Author: luke
Date: Wed May  4 15:46:27 2011
New Revision: 45833

URL: http://svn.erp5.org?rev=45833&view=rev
Log:
Allow to pass empty args and extend list by while passing more.

Modified:
    erp5/trunk/utils/slapos.recipe.erp5/src/slapos/recipe/erp5/execute.py

Modified: erp5/trunk/utils/slapos.recipe.erp5/src/slapos/recipe/erp5/execute.py
URL: http://svn.erp5.org/erp5/trunk/utils/slapos.recipe.erp5/src/slapos/recipe/erp5/execute.py?rev=45833&r1=45832&r2=45833&view=diff
==============================================================================
--- erp5/trunk/utils/slapos.recipe.erp5/src/slapos/recipe/erp5/execute.py [utf8] (original)
+++ erp5/trunk/utils/slapos.recipe.erp5/src/slapos/recipe/erp5/execute.py [utf8] Wed May  4 15:46:27 2011
@@ -5,10 +5,12 @@ import subprocess
 import time
 
 
-def execute(args):
+def execute(args=None):
   """Portable execution with process replacement"""
   # Note: Candidate for slapos.lib.recipe
-  os.execv(args[0], args)
+  if args is None:
+    args = []
+  os.execv(args[0], args + sys.argv[1:])
 
 child_pg = None
 



More information about the Erp5-report mailing list