py: Fix CameraManager.version property
The current CameraManager.version doesn't work at all (raises a TypeError), as that's not how you use expose C++ static methods as Python class methods. Fix it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
b9ecd85ed1
commit
9506da142b
2 changed files with 5 additions and 1 deletions
|
@ -105,7 +105,7 @@ PYBIND11_MODULE(_libcamera, m)
|
|||
return cm;
|
||||
})
|
||||
|
||||
.def_property_readonly("version", &PyCameraManager::version)
|
||||
.def_property_readonly_static("version", [](py::object /* self */) { return PyCameraManager::version(); })
|
||||
.def("get", &PyCameraManager::get, py::keep_alive<0, 1>())
|
||||
.def_property_readonly("cameras", &PyCameraManager::cameras)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue