From 2f578a4c2dec3f8baa2db364197ced089ae1d4eb Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 3 Sep 2012 08:08:33 +0200 Subject: [PATCH] Avoid dict comprehension for compatibility. This fixes #128. --- rq/scripts/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rq/scripts/__init__.py b/rq/scripts/__init__.py index d80e9f48..a6753859 100644 --- a/rq/scripts/__init__.py +++ b/rq/scripts/__init__.py @@ -16,7 +16,9 @@ def add_standard_arguments(parser): def read_config_file(module): """Reads all UPPERCASE variables defined in the given module file.""" settings = __import__(module, [], [], [], -1) - return {k: v for k, v in settings.__dict__.items() if k.upper() == k} + return dict([(k, v) + for k, v in settings.__dict__.items() + if k.upper() == k]) def setup_default_arguments(args, settings):