summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-05-30 17:27:11 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-01 12:08:56 +0300
commit80e0ff355ee64cd50940b1e94d6e43c5f19afdfa (patch)
treeb49229b0b081ceb31e1b72e782f3546e8d69f76c
parent733047476213010ad0831c3344430f51774578b8 (diff)
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>
-rw-r--r--src/py/libcamera/py_main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp
index 3220a9e6..9e827845 100644
--- a/src/py/libcamera/py_main.cpp
+++ b/src/py/libcamera/py_main.cpp
@@ -496,7 +496,8 @@ PYBIND11_MODULE(_libcamera, m)
* \todo As we add a keep_alive to the fb in addBuffers(), we
* 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
.value("Pending", Request::RequestPending)