cli: Parse on/off as boolean

This commit is contained in:
Martchus 2017-12-05 15:11:28 +01:00
parent 02586635b5
commit 79a8be22c5
1 changed files with 2 additions and 2 deletions

View File

@ -679,9 +679,9 @@ string tagName(const Tag *tag)
bool stringToBool(const string &str) bool stringToBool(const string &str)
{ {
if(str == "yes" || str == "true" || str == "1") { if(str == "yes" || str == "true" || str == "on" || str == "1") {
return true; return true;
} else if(str == "no" || str == "false" || str == "0") { } else if(str == "no" || str == "false" || str == "off" || str == "0") {
return false; return false;
} }
throw ConversionException(argsToString('\"', str, "\" is not yes or no")); throw ConversionException(argsToString('\"', str, "\" is not yes or no"));