From 476301116a3ce5818c157ff7efda83ce79b16b81 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 7 Oct 2019 19:10:34 -0500 Subject: hscript: Generalise BooleanKey failure mode for all keys --- hscript/network.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'hscript/network.cc') diff --git a/hscript/network.cc b/hscript/network.cc index 8f79d96..9456d09 100644 --- a/hscript/network.cc +++ b/hscript/network.cc @@ -17,10 +17,8 @@ using namespace Horizon::Keys; Key *Network::parseFromData(const std::string data, int lineno, int *errors, int *warnings) { bool value; - if(!BooleanKey::parse(data, &value)) { - output_error("installfile:" + std::to_string(lineno), - "network: expected 'true' or 'false'", - "'" + data + "' is not a valid Boolean value"); + if(!BooleanKey::parse(data, "installfile:" + std::to_string(lineno), + "network", &value)) { if(errors) *errors += 1; return nullptr; } -- cgit v1.2.3-60-g2f50