# HG changeset patch # User mcroydon # Date 1231437484 0 # Node ID d8ee2a6d318e48b597f8fb19df1c17e2764462a0 # Parent 6a05de0f37c1945133a4d20211e08f907fddf6d0 Change django settings access to use getattr. Thanks, James. diff -r 6a05de0f37c1 -r d8ee2a6d318e queues/__init__.py --- a/queues/__init__.py Thu Jan 08 15:40:25 2009 +0000 +++ b/queues/__init__.py Thu Jan 08 17:58:04 2009 +0000 @@ -37,7 +37,7 @@ # If set both places, django takes precedence. try: from django.conf import settings - BACKEND = settings.get('QUEUE_BACKEND', None) + BACKEND = getattr(settings, 'QUEUE_BACKEND', None) except: BACKEND = os.environ.get('QUEUE_BACKEND') diff -r 6a05de0f37c1 -r d8ee2a6d318e queues/backends/__init__.py --- a/queues/backends/__init__.py Thu Jan 08 15:40:25 2009 +0000 +++ b/queues/backends/__init__.py Thu Jan 08 17:58:04 2009 +0000 @@ -7,7 +7,7 @@ # If set both places, django takes precedence. try: from django.conf import settings - BACKEND = settings.get('QUEUE_BACKEND', None) + BACKEND = getattr(settings, 'QUEUE_BACKEND', None) except: BACKEND = os.environ.get('QUEUE_BACKEND', None) diff -r 6a05de0f37c1 -r d8ee2a6d318e queues/backends/memcached.py --- a/queues/backends/memcached.py Thu Jan 08 15:40:25 2009 +0000 +++ b/queues/backends/memcached.py Thu Jan 08 17:58:04 2009 +0000 @@ -19,7 +19,7 @@ try: from django.conf import settings - CONN = settings.get('QUEUE_MEMCACHE_CONNECTION', None) + CONN = getattr(settings, 'QUEUE_MEMCACHE_CONNECTION', None) except: CONN = os.environ.get('QUEUE_MEMCACHE_CONNECTION', None) diff -r 6a05de0f37c1 -r d8ee2a6d318e queues/backends/sqs.py --- a/queues/backends/sqs.py Thu Jan 08 15:40:25 2009 +0000 +++ b/queues/backends/sqs.py Thu Jan 08 17:58:04 2009 +0000 @@ -17,8 +17,8 @@ try: from django.conf import settings - KEY = settings.get('AWS_ACCESS_KEY_ID', None) - SECRET = settings.get('AWS_SECRET_ACCESS_KEY', None) + KEY = getattr(settings, 'AWS_ACCESS_KEY_ID', None) + SECRET = getattr(settings, 'AWS_SECRET_ACCESS_KEY', None) except: KEY = os.environ.get('AWS_ACCESS_KEY_ID', None) SECRET = os.environ.get('AWS_SECRET_ACCESS_KEY', None)