Module: kamailio
Branch: master
Commit: 310c60cb34641f73ac0e8b48c9bf68efa5fb3533
URL:
https://github.com/kamailio/kamailio/commit/310c60cb34641f73ac0e8b48c9bf68e…
Author: AnthonyA <ascanio.alba7(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-03-02T21:00:00+01:00
app_python: don't hide the real exception on load failure
- don't call PyErr_PrintEx() as this clears the error indicator
---
Modified: src/modules/app_python/app_python_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/310c60cb34641f73ac0e8b48c9bf68e…
Patch:
https://github.com/kamailio/kamailio/commit/310c60cb34641f73ac0e8b48c9bf68e…
---
diff --git a/src/modules/app_python/app_python_mod.c
b/src/modules/app_python/app_python_mod.c
index 78cee45c66..98738ee66c 100644
--- a/src/modules/app_python/app_python_mod.c
+++ b/src/modules/app_python/app_python_mod.c
@@ -287,7 +287,7 @@ int apy_reload_script(void)
PY_GIL_ENSURE;
pModule = PyImport_ReloadModule(_sr_apy_module);
if (!pModule) {
- PyErr_PrintEx(0);
+ // PyErr_PrintEx(0); - don't hide the real exception
if (!PyErr_Occurred())
PyErr_Format(PyExc_ImportError, "Reload module '%s'", bname);
python_handle_exception("mod_init");