Module: kamailio
Branch: master
Commit: c62f78e73390dff617a45a3c2e1f5d0382698510
URL:
https://github.com/kamailio/kamailio/commit/c62f78e73390dff617a45a3c2e1f5d0…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: space88man <shihping.chan(a)gmail.com>
Date: 2024-11-05T11:01:08+08:00
app_python3: clean-up of early imports
---
Modified: src/modules/app_python3/app_python3_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c62f78e73390dff617a45a3c2e1f5d0…
Patch:
https://github.com/kamailio/kamailio/commit/c62f78e73390dff617a45a3c2e1f5d0…
---
diff --git a/src/modules/app_python3/app_python3_mod.c
b/src/modules/app_python3/app_python3_mod.c
index 57cf1864ced..ef243510d6a 100644
--- a/src/modules/app_python3/app_python3_mod.c
+++ b/src/modules/app_python3/app_python3_mod.c
@@ -353,7 +353,7 @@ int apy_reload_script(void)
return rval;
}
-#define INTERNAL_VERSION "1002\n"
+#define INTERNAL_VERSION "1003\n"
int apy_load_script(void)
{
@@ -376,11 +376,7 @@ int apy_load_script(void)
// Py3 does not create a package-like hierarchy of modules
// make legacy modules importable using Py2 syntax
- rc = PyRun_SimpleString("import sys\n"
- "import KSR\n"
- "KSR.__version__ = " INTERNAL_VERSION
- "sys.modules['KSR.pv'] = KSR.pv\n"
- "sys.modules['KSR.x'] = KSR.x\n");
+ rc = PyRun_SimpleString("import KSR\nKSR.__version__ = " INTERNAL_VERSION);
if(rc) {
LM_ERR("Early imports of modules failed\n");
goto err;