X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d8242f44e244b1200a521bb2eb97397fa7e84471..cbc139a1f575f951f48b0e120bc79cbfd3cae613:/src/bindings/python/simgrid_python.cpp diff --git a/src/bindings/python/simgrid_python.cpp b/src/bindings/python/simgrid_python.cpp index deaa3af282..af3d7583e4 100644 --- a/src/bindings/python/simgrid_python.cpp +++ b/src/bindings/python/simgrid_python.cpp @@ -286,16 +286,8 @@ PYBIND11_MODULE(simgrid, m) }, "Amount of work remaining until completion from 0 (completely done) to 1 (nothing done " "yet).") - .def_property( - "host", - [](simgrid::s4u::ExecPtr self) { - simgrid::s4u::ExecSeqPtr seq = boost::dynamic_pointer_cast(self); - if (seq != nullptr) - return seq->get_host(); - xbt_throw_unimplemented(__FILE__, __LINE__, - "host of parallel executions is not implemented in python yet."); - }, - &simgrid::s4u::Exec::set_host, "Host on which this execution runs.") + .def_property("host", &simgrid::s4u::Exec::get_host, &simgrid::s4u::Exec::set_host, + "Host on which this execution runs. Only the first host is returned for parallel executions.") .def("test", &simgrid::s4u::Exec::test, py::call_guard(), "Test whether the execution is terminated.") .def("cancel", &simgrid::s4u::Exec::cancel, py::call_guard(), "Cancel that execution.")