From 676de05f7f06e52258a07a68a8f399368324d1aa Mon Sep 17 00:00:00 2001 From: david Date: Tue, 28 Aug 2012 12:17:36 +0000 Subject: [PATCH] Provide a default {} value for script categories. This is so I don't have to write categories = {} when writing test scripts. --- nse_main.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nse_main.lua b/nse_main.lua index 62b6b1d32..1e6365211 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -418,6 +418,7 @@ do return nil; end + -- Script.new provides defaults for some of these. local required_fields = { action = "function", categories = "table", @@ -469,6 +470,7 @@ do local env = { SCRIPT_PATH = filename, SCRIPT_NAME = short_basename, + categories = {}, dependencies = {}, }; setmetatable(env, {__index = _G});