py: Add Request.__str__()

Add Request.__str__() which maps directly to Request::toString().

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:
Tomi Valkeinen 2022-05-30 17:27:11 +03:00 committed by Laurent Pinchart
parent 7330474762
commit 80e0ff355e

View file

@ -496,7 +496,8 @@ PYBIND11_MODULE(_libcamera, m)
* \todo As we add a keep_alive to the fb in addBuffers(), we * \todo As we add a keep_alive to the fb in addBuffers(), we
* can only allow reuse with ReuseBuffers. * can only allow reuse with ReuseBuffers.
*/ */
.def("reuse", [](Request &self) { self.reuse(Request::ReuseFlag::ReuseBuffers); }); .def("reuse", [](Request &self) { self.reuse(Request::ReuseFlag::ReuseBuffers); })
.def("__str__", &Request::toString);
pyRequestStatus pyRequestStatus
.value("Pending", Request::RequestPending) .value("Pending", Request::RequestPending)