From deb898161bbdf14ba8a47fc6e012413566012018 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Mon, 11 Jul 2011 13:24:24 -0700 Subject: [PATCH] Cleanup: don't look before you leap. --- common.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/common.py b/common.py index d8e5c75..373d191 100644 --- a/common.py +++ b/common.py @@ -92,10 +92,7 @@ def setup(): if 'fixtures' not in config: raise RuntimeError('Your config file is missing the fixtures section!') - if config.fixtures.has_key('bucket prefix'): - template = config.fixtures['bucket prefix'] - else: - template = 'test-{random}-' + template = config.fixtures.get('bucket prefix', 'test-{random}-') prefix = choose_bucket_prefix(template=template) if prefix == '': raise RuntimeError("Empty Prefix! Aborting!")