summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Marec <frederic.marec@iot.bzh>2018-11-28 11:25:46 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 11:33:40 +0100
commit44e36a0050f64168b213a934bcedf21c66d7b134 (patch)
tree842e579f0ca7080718520d2e20406e64c37ad729
parent2ab1ba4ff446c58664b9c69bd0110ea542617c8e (diff)
Add new assert verb
Add assertIsTrue verb who allow table and string argument Bug-AGL: SPEC-1983 Change-Id: I8a13b7cdd8d4b841c37e732ffa225b4b9822fad8 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
-rw-r--r--conf.d/controller/lua.d/aft.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/conf.d/controller/lua.d/aft.lua b/conf.d/controller/lua.d/aft.lua
index 1ff6d25..7b6379a 100644
--- a/conf.d/controller/lua.d/aft.lua
+++ b/conf.d/controller/lua.d/aft.lua
@@ -338,7 +338,7 @@ local function assertVerbCallParameters(src, api, verb, args)
_AFT.assertIsUserdata(src, "Source must be an opaque userdata pointer which will be passed to the binder")
_AFT.assertIsString(api, "API and Verb must be string")
_AFT.assertIsString(verb, "API and Verb must be string")
- _AFT.assertIsTable(args, "Arguments must use LUA Table (event empty)")
+ _AFT.assertIsTrue( (type(args) == "table" or type(args) == "string"), "Arguments must use LUA Table or string (even empty)")
end
function _AFT.callVerb(api, verb, args)