fm-common: updated initfm_core to PyInit_fm_core
According with python 3 migration rules: PyMODINIT_FUNC init<yourmodulename>(void) has changed to below in Python 3: PyMODINIT_FUNC PyInit_<yourmodulename>(void) otherwise there is below issue: CRITICAL sysinv [-] Unhandled error: ImportError: dynamic module does not define module export function (PyInit_fm_core) ERROR sysinv Traceback (most recent call last): ERROR sysinv File "/usr/bin/sysinv-puppet", line 10, in <module> Story: 2008454 Task: 41440 Signed-off-by: Haiqing Bai <haiqing.bai@windriver.com> Change-Id: Id51da7f328b41ec389cf2e073db7ff6617398339
This commit is contained in:
parent
b12f3745b1
commit
cd1487e1a5
|
@ -322,7 +322,11 @@ static struct PyModuleDef cModPyDem =
|
|||
_methods
|
||||
};
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyMODINIT_FUNC PyInit_fm_core() {
|
||||
#else
|
||||
PyMODINIT_FUNC initfm_core() {
|
||||
#endif
|
||||
PyObject *m = PyModule_Create(&cModPyDem);
|
||||
if (m == NULL){
|
||||
PySys_WriteStderr("Failed to initialize fm_core");
|
||||
|
|
Loading…
Reference in New Issue