From a6e57dd7c072ef027374c557fc525bfcc0a5369d Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 29 Aug 2012 15:03:14 +0200 Subject: [PATCH] Fix: change import path before importing settings module. --- rq/scripts/rqworker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rq/scripts/rqworker.py b/rq/scripts/rqworker.py index 5a66f45..0b78d79 100755 --- a/rq/scripts/rqworker.py +++ b/rq/scripts/rqworker.py @@ -64,6 +64,9 @@ def read_config_file(module): def main(): args = parse_args() + if args.path: + sys.path = args.path.split(':') + sys.path + settings = {} if args.config: settings = read_config_file(args.config) @@ -78,9 +81,6 @@ def main(): if args.sentry_dsn is None: args.sentry_dsn = settings.get('SENTRY_DSN', None) - if args.path: - sys.path = args.path.split(':') + sys.path - setup_loghandlers(args) setup_redis(args)