[icinga-checkins] icinga.org: icinga2/master: Fix "object list" output for empty fields

git at icinga.org git at icinga.org
Sat Nov 15 12:19:57 CET 2014


Module: icinga2
Branch: master
Commit: bae96ca5245a7d9b4356bdd65cd1be21e627e330
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=bae96ca5245a7d9b4356bdd65cd1be21e627e330

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Sat Nov 15 12:19:29 2014 +0100

Fix "object list" output for empty fields

---

 lib/cli/objectlistcommand.cpp |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/cli/objectlistcommand.cpp b/lib/cli/objectlistcommand.cpp
index 0e36ba9..7d48075 100644
--- a/lib/cli/objectlistcommand.cpp
+++ b/lib/cli/objectlistcommand.cpp
@@ -227,6 +227,11 @@ void ObjectListCommand::PrintValue(std::ostream& fp, const Value& val)
 		return;
 	}
 
+	if (val.IsEmpty()) {
+		fp << "null";
+		return;
+	}
+
 	fp << Convert::ToString(val);
 }
 



More information about the icinga-checkins mailing list