Fixed working with keys in salt print result
Change-Id: I53f4f65b0cc1596fe370207cd1894e55466d420d
diff --git a/src/com/mirantis/mk/Common.groovy b/src/com/mirantis/mk/Common.groovy
index 8c0b56e..0de056e 100644
--- a/src/com/mirantis/mk/Common.groovy
+++ b/src/com/mirantis/mk/Common.groovy
@@ -105,6 +105,23 @@
}
/**
+ * Print debug message, this message will show only if DEBUG global variable is present
+ * @param msg
+ * @param color Colorful output or not
+ */
+def debugMsg(msg, color = true){
+ def debugEnabled
+ try {
+ debugEnabled = DEBUG
+ } catch (MissingPropertyException e) {
+ debugEnabled = false
+ }
+ if(debugEnabled){
+ printMsg(msg, "red")
+ }
+}
+
+/**
* Print message
*
* @param msg Message to be printed