From ed55f3a0a716502635df8dbdc7a175f5760d9332 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 14 Feb 2019 07:24:09 -0600 Subject: [PATCH] mgr/ActivePyModules: do not touch PyFormatter without the GIL Signed-off-by: Sage Weil (cherry picked from commit 9ad2283db555a38b4951e42001ba884ba2dd86bf) Conflicts: there is no "devices" API until Nautilus. --- src/mgr/ActivePyModules.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index 7cb660ab0af..f577d48f202 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -98,10 +98,10 @@ PyObject *ActivePyModules::get_server_python(const std::string &hostname) 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 &all) { PyEval_RestoreThread(tstate); -- 2.47.3