threading.local instances are not iterable, #fix #6

Merged
fabiomcosta merged 2 commits from master into master 2011-12-21 18:39:45 +00:00
Showing only changes of commit d2d8c7e3c2 - Show all commits

View file

@ -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()