print (none) if no warnings in -getinfo
This commit is contained in:
1 parent
e66630cc87
commit
0cea7b10f1
1 file changed
+3
-1
+3
-1
@@ -1059,7 +1059,9 @@ static void ParseGetInfoResult(UniValue& result)
|
||||
result_string += "\n";
|
||||
}
|
||||
|
||||
result_string += strprintf("%sWarnings:%s %s", YELLOW, RESET, result["warnings"].getValStr());
|
||||
const std::string warnings{result["warnings"].getValStr()};
|
||||
result_string += strprintf("%sWarnings:%s %s", YELLOW, RESET, warnings.empty() ? "(none)" : warnings);
|
||||
|
||||
result.setStr(result_string);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user