From 95d99a4c857d7d5208d8faf974b01354a798eba4 Mon Sep 17 00:00:00 2001 From: Boris Egorov Date: Thu, 20 Aug 2015 22:06:21 +0600 Subject: runtests: Simplify dictionary usage --- testing/runtests.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/testing/runtests.py b/testing/runtests.py index 149d457..83647c6 100644 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -41,10 +41,7 @@ class Tester: if (key=='config'): value = value.replace('$INPUTDIR',self.args.inputdir) #print('key=%s value=%s' % (key,value)) - if key in config: - config[key].append(value) - else: - config[key] = [value] + config.setdefault(key, []).append(value) return config def prepare_test(self): -- cgit v0.12