From 1751f9cfdcad0e7d459d73fc7e9c16fb12b5bfa8 Mon Sep 17 00:00:00 2001 From: Tobias Langer Date: Tue, 11 Oct 2016 13:11:56 +0200 Subject: [PATCH] Fixed problem with tasksets getting the same name. --- tasksetgen.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasksetgen.py b/tasksetgen.py index 10d928c..a21afa9 100755 --- a/tasksetgen.py +++ b/tasksetgen.py @@ -193,6 +193,7 @@ def main(): os.makedirs(args.target) print('Writing tasks…', file=sys.stderr) + taken_names={} for taskset in tasksets: task_out = [] for task in taskset: @@ -208,6 +209,12 @@ def main(): name = 'taskset_{}_{}_{}'.format(now.strftime('%Y_%m_%d'), len(taskset), utilization) + try: + taken_names[name] += 1 + except KeyError: + taken_names[name] = 1 + + name += '_{}'.format(taken_names[name]) out = {} out['name'] = name -- libgit2 0.26.0