From e316814281a827ac8c74a20645f62eba10cd3309 Mon Sep 17 00:00:00 2001 From: Andrew Grant Date: Fri, 28 May 2021 09:20:11 -0400 Subject: [PATCH] Fix workloads when none given --- OpenBench/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenBench/utils.py b/OpenBench/utils.py index 9e8d0b5..02530b6 100644 --- a/OpenBench/utils.py +++ b/OpenBench/utils.py @@ -355,7 +355,8 @@ def selectWorkload(tests, machine): elif options and test.priority == highest: options.append(test) - return ['None', random.choice(options)][len(options) != 0] + if len(options) == 0: return 'None' + return random.choice(options) def workloadDictionary(test, result, machine):