From 6e868b6382cabbacffb1d12dc91f7eb9a8362ce2 Mon Sep 17 00:00:00 2001 From: onefang Date: Sat, 28 Dec 2019 22:39:52 +1000 Subject: Tweak the dumpTable() arguments a little. --- apt-panopticommon.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'apt-panopticommon.lua') diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua index cfea728..53bd674 100644 --- a/apt-panopticommon.lua +++ b/apt-panopticommon.lua @@ -182,8 +182,6 @@ APT.parseArgs = function(args) return arg, sendArgs end ---print(APT.dumpTable(APT.options, "", "options")) - --[[ Ordered table iterator, allow to iterate on the natural order of the keys of a table. @@ -232,7 +230,8 @@ function APT.orderedPairs(t) end -- Use this to dump a table to a string, with HTML. -APT.dumpTableHTML = function (table, space, name) +APT.dumpTableHTML = function (table, name, space) + if nil == space then space = '' end local r = name .. "\n" r = r .. dumpTableHTMLSub(table, space .. " ") r = r .. space .. "" @@ -243,9 +242,9 @@ dumpTableHTMLSub = function (table, space) for k, v in APT.orderedPairs(table) do if type(v) == "table" then if " " == space then - r = r .. space .. APT.dumpTableHTML(v, space, k .. "
\n") - APT.logFile:write(APT.dumpTable(APT.args, '', 'Arguments')) + APT.logFile:write(APT.dumpTable(APT.args, 'Arguments')) APT.logFile:write("\n") else return false -- cgit v1.1