Commit 1751f9cf by Tobias Langer

Fixed problem with tasksets getting the same name.

parent c0b78645
...@@ -193,6 +193,7 @@ def main(): ...@@ -193,6 +193,7 @@ def main():
os.makedirs(args.target) os.makedirs(args.target)
print('Writing tasks…', file=sys.stderr) print('Writing tasks…', file=sys.stderr)
taken_names={}
for taskset in tasksets: for taskset in tasksets:
task_out = [] task_out = []
for task in taskset: for task in taskset:
...@@ -208,6 +209,12 @@ def main(): ...@@ -208,6 +209,12 @@ def main():
name = 'taskset_{}_{}_{}'.format(now.strftime('%Y_%m_%d'), name = 'taskset_{}_{}_{}'.format(now.strftime('%Y_%m_%d'),
len(taskset), len(taskset),
utilization) utilization)
try:
taken_names[name] += 1
except KeyError:
taken_names[name] = 1
name += '_{}'.format(taken_names[name])
out = {} out = {}
out['name'] = name out['name'] = name
......
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 sign in to comment