From cc0d656b86b074f4809fb56835afa7edb9d9fef7 Mon Sep 17 00:00:00 2001 From: "roberto@debian32" Date: Sat, 8 Jan 2011 12:01:19 +0100 Subject: [PATCH] fixed python multiapp loading --- plugins/python/pyloader.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c index a2724eda..9b1374c0 100644 --- a/plugins/python/pyloader.c +++ b/plugins/python/pyloader.c @@ -376,10 +376,14 @@ PyObject *uwsgi_uwsgi_loader(void *arg1) { } applications = PyDict_GetItemString(uwsgi_dict, "applications"); - if (applications) return applications; + if (applications && PyDict_Check(applications)) return applications; + + uwsgi_log("QUICK CALLABLE = %s\n", quick_callable); applications = PyDict_GetItemString(wsgi_dict, "applications"); - if (applications) return applications; + if (applications && PyDict_Check(applications)) return applications; + + uwsgi_log("QUICK CALLABLE = %s\n", quick_callable); // quick callable -> thanks gunicorn for the idea // we have extended the concept a bit...