PyObject *ActivePyModules::list_servers_python()
{
+ PyFormatter f(false, true);
PyThreadState *tstate = PyEval_SaveThread();
dout(10) << " >" << dendl;
- PyFormatter f(false, true);
daemon_state.with_daemons_by_server([this, &f, &tstate]
(const std::map<std::string, DaemonStateCollection> &all) {
PyEval_RestoreThread(tstate);
);
return f.get();
} else if (what == "devices") {
- f.open_array_section("devices");
daemon_state.with_devices2(
- [&tstate]() {
+ [&tstate, &f]() {
PyEval_RestoreThread(tstate);
+ f.open_array_section("devices");
},
[&f] (const DeviceState& dev) {
f.dump_object("device", dev);