From 04fbc523cf07bb0e81d8f05dab67ba85747df2e9 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Wed, 10 Jul 2013 17:17:43 -0700 Subject: [PATCH] mon: Monitor: 'health detail --format=json' should only output JSON Fixes: #5526 Signed-off-by: Joao Eduardo Luis --- src/mon/Monitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index aafd2883e0a..f64b6b1b318 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1771,7 +1771,7 @@ void Monitor::get_health(string& status, bufferlist *detailbl, Formatter *f) while (!detail.empty()) { if (f) f->dump_string("item", detail.front().second); - if (detailbl != NULL) { + else if (detailbl != NULL) { detailbl->append(detail.front().second); detailbl->append('\n'); } -- 2.47.3