From 10f90f0d483d1a46a58d7fd42fb406cd46a9c1a6 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Fri, 24 Jul 2020 20:25:20 +0300 Subject: Configuration: added checking for presence of mandatory fields. --- src/nxt_python_wsgi.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/nxt_python_wsgi.c') diff --git a/src/nxt_python_wsgi.c b/src/nxt_python_wsgi.c index b9033a75..7e8d1d79 100644 --- a/src/nxt_python_wsgi.c +++ b/src/nxt_python_wsgi.c @@ -243,11 +243,6 @@ nxt_python_start(nxt_task_t *task, nxt_process_data_t *data) app_conf = data->app; c = &app_conf->u.python; - if (c->module.length == 0) { - nxt_alert(task, "python module is empty"); - return NXT_ERROR; - } - if (c->home != NULL) { len = nxt_strlen(c->home); -- cgit From b28b4459b0899cb8357df5f6c1e904fd1a34ebe3 Mon Sep 17 00:00:00 2001 From: Tiago Natel de Moura Date: Fri, 31 Jul 2020 12:21:21 +0100 Subject: Isolation: fixed the generation of mounts table. Since the introduction of rootfs feature, some language modules can't be configured multiple times. Now the configure generates a separate nxt__mounts.h for each module compiled. --- src/nxt_python_wsgi.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/nxt_python_wsgi.c') diff --git a/src/nxt_python_wsgi.c b/src/nxt_python_wsgi.c index 7e8d1d79..c4b7702e 100644 --- a/src/nxt_python_wsgi.c +++ b/src/nxt_python_wsgi.c @@ -18,7 +18,8 @@ #include #include #include -#include + +#include NXT_PYTHON_MOUNTS_H /* * According to "PEP 3333 / A Note On String Types" @@ -39,11 +40,6 @@ */ -#define _NXT_PYTHON_MOUNTS(major, minor) \ - nxt_python ## major ## minor ## _mounts - -#define NXT_PYTHON_MOUNTS(major, minor) _NXT_PYTHON_MOUNTS(major, minor) - #if PY_MAJOR_VERSION == 3 #define NXT_PYTHON_BYTES_TYPE "bytestring" @@ -123,8 +119,8 @@ NXT_EXPORT nxt_app_module_t nxt_app_module = { compat, nxt_string("python"), PY_VERSION, - NXT_PYTHON_MOUNTS(PY_MAJOR_VERSION, PY_MINOR_VERSION), - nxt_nitems(NXT_PYTHON_MOUNTS(PY_MAJOR_VERSION, PY_MINOR_VERSION)), + nxt_python_mounts, + nxt_nitems(nxt_python_mounts), NULL, nxt_python_start, }; -- cgit