Module: kamailio
Branch: master
Commit: ec4d74ad7c1d1b14a4f33f995845ac7b299540cf
URL:
https://github.com/kamailio/kamailio/commit/ec4d74ad7c1d1b14a4f33f995845ac7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-27T09:09:26+02:00
app_python: remove condition on classname, being set to non-null
---
Modified: src/modules/app_python/app_python_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ec4d74ad7c1d1b14a4f33f995845ac7…
Patch:
https://github.com/kamailio/kamailio/commit/ec4d74ad7c1d1b14a4f33f995845ac7…
---
diff --git a/src/modules/app_python/app_python_mod.c
b/src/modules/app_python/app_python_mod.c
index 1b7b490190..73651ba8cf 100644
--- a/src/modules/app_python/app_python_mod.c
+++ b/src/modules/app_python/app_python_mod.c
@@ -353,7 +353,7 @@ static int child_init(int rank)
if (!PyErr_Occurred())
PyErr_Format(PyExc_AttributeError,
"class object '%s' has is not callable attribute '%s'",
- !classname ? "None" : classname, mod_init_fname.s);
+ classname, mod_init_fname.s);
python_handle_exception("child_init");
Py_DECREF(format_exc_obj);
Py_XDECREF(pFunc);
@@ -389,9 +389,6 @@ static int child_init(int rank)
Py_DECREF(pFunc);
Py_DECREF(pArgs);
-
-
-
if (PyErr_Occurred()) {
python_handle_exception("child_init");
Py_DECREF(format_exc_obj);
@@ -422,7 +419,6 @@ static int child_init(int rank)
return -1;
}
-
rval = PyInt_AsLong(pResult);
Py_DECREF(pResult);
PyThreadState_Swap(NULL);