From d2d8c7e3c2937cb10dc38b71969c93b2fa97bf7b Mon Sep 17 00:00:00 2001 From: Fabio Miranda Costa Date: Wed, 21 Dec 2011 16:38:27 -0300 Subject: [PATCH] fix, if the settings is a threading.local() instance it does not have the items() function, but its iterable through the __dict__ property --- django_pyvows/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_pyvows/server.py b/django_pyvows/server.py index cfe03a8..ce76aec 100644 --- a/django_pyvows/server.py +++ b/django_pyvows/server.py @@ -125,7 +125,7 @@ class DjangoServer(HTTPServer, object): thread = current_thread() if not hasattr(thread, "settings"): thread.settings = local() - for key, value in settings.items(): + for key, value in getattr(settings, '__dict__', settings).items(): setattr(thread.settings, key, value) while True: self.handle_request()