Enable compatibility with older versions of libconfig (such as the one shipped with RHEL/CentOS 7)
This commit is contained in:
@@ -41,7 +41,7 @@ std::shared_ptr<Action> Action::makeAction(Device *device, libconfig::Setting
|
||||
}
|
||||
|
||||
try {
|
||||
auto& action_type = setting.lookup("type");
|
||||
auto& action_type = setting["type"];
|
||||
|
||||
if(action_type.getType() != libconfig::Setting::TypeString) {
|
||||
logPrintf(WARN, "Line %d: Action type must be a string",
|
||||
@@ -76,4 +76,4 @@ std::shared_ptr<Action> Action::makeAction(Device *device, libconfig::Setting
|
||||
setting.getSourceLine());
|
||||
throw InvalidAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user