Parse arguments rather than forking out a shell

This commit is contained in:
Marco Pesenti Gritti
2007-10-23 18:22:59 +02:00
parent 3b57c5f247
commit 880f1c637d
2 changed files with 10 additions and 12 deletions
+1 -4
View File
@@ -40,8 +40,7 @@ if len(activities) == 0:
print 'Activity not found.'
activity = activities[0]
cmd_args = activityfactory.get_command(activity).split(' ')
print cmd_args
cmd_args = activityfactory.get_command(activity)
def _get_interpreter(exec_file):
if os.path.exists(exec_file):
@@ -66,7 +65,5 @@ if options.debug:
cmd_args.extend(_get_interpreter(act_args.pop(0)))
cmd_args.extend(act_args)
print cmd_args
os.execvpe(cmd_args[0], cmd_args, activityfactory.get_environment(activity))