diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-04-15 22:44:57 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-04-15 22:44:57 +0300 |
commit | 924986d7dadfed2150989af84f828e986c114116 (patch) | |
tree | ccca19e9be2ff0fdb9333a8dc5345b30ec7d6a11 | |
parent | 787fd259d015c926c2cf3e88b7271a1ca4441a51 (diff) | |
download | awall-924986d7dadfed2150989af84f828e986c114116.tar.bz2 awall-924986d7dadfed2150989af84f828e986c114116.tar.xz |
error message for invalid top-level attributes
-rw-r--r-- | awall/policy.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/awall/policy.lua b/awall/policy.lua index f6f427f..35ef24e 100644 --- a/awall/policy.lua +++ b/awall/policy.lua @@ -204,6 +204,10 @@ function PolicySet:load() {'description', 'import', 'after', 'before'}, cls ) then + if type(objs) ~= 'table' then + raise('Invalid top-level attribute: '..cls..' ('..name..')') + end + if not source[cls] then source[cls] = {} end if not input[cls] then |