Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix deprecation of Engine.get_clock()
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Tue, 1 Feb 2022 08:43:47 +0000 (09:43 +0100)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Tue, 1 Feb 2022 09:01:34 +0000 (10:01 +0100)
src/bindings/python/simgrid_python.cpp

index 81ca289..84116b8 100644 (file)
@@ -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(); },