diff options
author | Unbit <info@unbit.it> | 2013-10-18 13:27:28 +0200 |
---|---|---|
committer | Unbit <info@unbit.it> | 2013-10-18 13:27:28 +0200 |
commit | 3e17a7136b1fadbe6dc9c7dea13860a68fd81441 (patch) | |
tree | 5f8d74368fb720d014a312c138b1ba7b5c9e46b1 | |
parent | 9548daf86f2c5126aeb7cbf9756da0ea3dd98072 (diff) | |
download | uwsgi-1.9.18.tar.gz |
backported fix for python multiappuwsgi-1.9.18
-rw-r--r-- | plugins/python/pyloader.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c index 7d06efe4..479b0a15 100644 --- a/plugins/python/pyloader.c +++ b/plugins/python/pyloader.c @@ -227,6 +227,10 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre PyObject *callables_dict = get_uwsgi_pydict((char *)arg1); if (callables_dict) { wi->callable = PyDict_GetItem(callables_dict, (PyObject *)wi->callable); + if (!wi->callable) { + uwsgi_log("skipping broken app %s\n", wsgi_req->appid); + goto multiapp; + } } } } @@ -357,6 +361,7 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre uwsgi_apps_cnt++; +multiapp: if (multiapp > 1) { for(i=1;i<multiapp;i++) { PyObject *app_mnt = PyList_GetItem(app_list, i); |