Commit 211a1313 authored by Adam Greig's avatar Adam Greig

Fix Python3 binding's submodules

Previously the Python3 cv2 package ends up with no submodules (bgsegm, face,
etc) in it, which makes a lot of functionality unusable. By not writing over
our root reference we ensure the new submodules are added to the correct cv2
module.
parent baf191fa
......@@ -1235,7 +1235,9 @@ static void init_submodule(PyObject * root, const char * name, PyMethodDef * met
submod = PyImport_AddModule(full_name.c_str());
PyDict_SetItemString(d, short_name.c_str(), submod);
}
root = submod;
if (short_name != "")
root = submod;
}
// populate module's dict
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment