summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-05-07 17:37:37 +0000
committerTed Trask <ttrask01@yahoo.com>2008-05-07 17:37:37 +0000
commit5221d57ca1e974f2339cc4be4f167015b8050c8b (patch)
treecdb9a7917e10d9a9285c2fae61e0c31756fd7b35
parentfba7653a3236bcb1f9dfe79961bbdf21d6c5a870 (diff)
downloadacf-gnats-5221d57ca1e974f2339cc4be4f167015b8050c8b.tar.bz2
acf-gnats-5221d57ca1e974f2339cc4be4f167015b8050c8b.tar.xz
Rewrote getopts.getoptsfromfile function to handle more complicated config files and removed getopts.getoptsfromfile_onperline function
git-svn-id: svn://svn.alpinelinux.org/acf/gnats/trunk@1111 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--gnats-model.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnats-model.lua b/gnats-model.lua
index a39090c..5a00ba1 100644
--- a/gnats-model.lua
+++ b/gnats-model.lua
@@ -378,9 +378,9 @@ end
function getconfig()
if (fs.is_file(configfile)) then
- return getopts.getoptsfromfile(configfile)
+ return getopts.getoptsfromfile(configfile, "") or {}
end
- return false
+ return {}
end
function get_filedetails(self,path)
@@ -425,7 +425,7 @@ function get_filedetails(self,path)
-- Sum all errors into one cfe
local sumerrors = ""
- for k,v in pairs(config or {}) do
+ for k,v in pairs(config) do
if (config[k]) and (config[k]["errtxt"]) and (config[k]["errtxt"] ~= "") then
sumerrors = sumerrors .. config[k]["errtxt"] .. "\n"
end