Commit e62305b4 authored by Nis Meinert's avatar Nis Meinert
Browse files

Variable `treename` is overwritten in the for loop and thus changes the...

Variable `treename` is overwritten in the for loop and thus changes the provided `input_tree` name for the second and following files.
Only affect cases when more than one file in provided in `files`.
parent 6ef68611
......@@ -96,7 +96,6 @@ rand_string = ''.join(random.choice(string.ascii_uppercase + string.digits) for
temp_file_prefix = temp_folder + '/' + rand_string # prefix temp files with folder and unique ID
output_tree = input_tree.split("/")[-1]
treename = input_tree
for input_file, output_file, dataset in files :
tmpinfile = input_file
......@@ -113,7 +112,7 @@ for input_file, output_file, dataset in files :
print('Specify either ETA or P branch name per track')
sys.exit(1)
command += " -n %s" % ntrvar
command += " -t %s" % treename
command += " -t %s" % input_tree
command += " -p %s_%s_corr" % (track, var)
command += " -c %s" % config
command += " -d %s" % dataset
......@@ -122,7 +121,6 @@ for input_file, output_file, dataset in files :
if seed :
command += " -s %d" % seed
treename = output_tree
tmpinfile = tmpoutfile
if 'tmp1' in tmpoutfile:
tmpoutfile = tmpoutfile.replace('tmp1', 'tmp2')
......
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