From 6971127a604a5cb00a04196276e51e6044a64bdf Mon Sep 17 00:00:00 2001 From: SUTER Frederic Date: Tue, 1 Feb 2022 09:43:47 +0100 Subject: [PATCH] fix deprecation of Engine.get_clock() --- src/bindings/python/simgrid_python.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bindings/python/simgrid_python.cpp b/src/bindings/python/simgrid_python.cpp index 81ca2895b1..84116b8405 100644 --- a/src/bindings/python/simgrid_python.cpp +++ b/src/bindings/python/simgrid_python.cpp @@ -147,11 +147,11 @@ PYBIND11_MODULE(simgrid, m) }), "The constructor should take the parameters from the command line, as is ") .def_static("get_clock", - [](pybind11::object& self) // XBT_ATTRIB_DEPRECATED_v334 + []() // XBT_ATTRIB_DEPRECATED_v334 { PyErr_WarnEx(PyExc_DeprecationWarning, "get_clock() is deprecated and will be dropped after v3.33, use clock instead.", 1); - return self.attr("clock"); + return Engine::get_clock(); }) .def_property_readonly_static( "clock", [](py::object /* self */) { return Engine::get_clock(); }, -- 2.20.1