Permalink
Browse files

Switched config file loading to import lib to allow dotted "paths" to…

… settings modules
  • Loading branch information...
1 parent 5fd85ec commit ba57f104ffd74fa707c7f6ddc03dfb1630dd212e @ulope ulope committed Nov 24, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 rq/scripts/__init__.py
View
@@ -1,3 +1,4 @@
+import importlib
import redis
from rq import use_connection
@@ -19,7 +20,7 @@ def add_standard_arguments(parser):
def read_config_file(module):
"""Reads all UPPERCASE variables defined in the given module file."""
- settings = __import__(module, [], [], [], -1)
+ settings = importlib.import_module(module)
return dict([(k, v)
for k, v in settings.__dict__.items()
if k.upper() == k])

0 comments on commit ba57f10

Please sign in to comment.