Commit 9f1ab449 authored by Betoule Marc's avatar Betoule Marc
Browse files

bug correction for empty param list in cross_prod

parent baea1871
......@@ -285,7 +285,10 @@ def launch_ccali(pipe, n, address=('',5000), authkey='secret', job_dir=
import re
l = subprocess.Popen(['qjob', '-wide','-nh'], stdout=subprocess.PIPE).communicate()[0]
existing_process = re.findall( '%s([0-9]*)'%job_name,l)
starting_num = max([int(p) for p in existing_process])+1
starting_num = 0
for i in range(starting_num,starting_num+n):
name = '%s%d'%(job_name,i)
jobfile = get_log_file (pipe, name+'.job')
......@@ -40,8 +40,13 @@ def cross_prod(*args):
return zip(*args)
l1 = args[0]
l2 = cross_prod(*(args[1:]))
if l1 and l2:
for a in l1:
res.extend([(a,)+b for b in l2])
elif l1:
elif l2:
return res
def union(*args):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment