diff options
author | onefang | 2019-11-05 21:04:35 +1000 |
---|---|---|
committer | onefang | 2019-11-05 21:04:35 +1000 |
commit | 48325410c2e8830a826b5571deba87f56d264d7c (patch) | |
tree | 1484ac65333dd27c8c4ea54b59251988edc4557d | |
parent | Make DNS report prettier. (diff) | |
download | apt-panopticon-48325410c2e8830a826b5571deba87f56d264d7c.zip apt-panopticon-48325410c2e8830a826b5571deba87f56d264d7c.tar.gz apt-panopticon-48325410c2e8830a826b5571deba87f56d264d7c.tar.bz2 apt-panopticon-48325410c2e8830a826b5571deba87f56d264d7c.tar.xz |
Don't stick a _ at the end of the results file name for the no IP case.
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 788d72c..84a6bed 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -608,7 +608,9 @@ if 0 < #arg then | |||
608 | checkHost(pu.host, pu.host, pu.path, arg[2], arg[3]) | 608 | checkHost(pu.host, pu.host, pu.path, arg[2], arg[3]) |
609 | end | 609 | end |
610 | logFile:close() | 610 | logFile:close() |
611 | local rfile, e = io.open("results/" .. pu.host .. "_" .. ip .. ".lua", "w+") | 611 | local f = pu.host |
612 | if "" ~= ip then f = f .. "_" .. ip end | ||
613 | local rfile, e = io.open("results/" .. f .. ".lua", "w+") | ||
612 | if nil == rfile then C("opening results file - " .. e) else | 614 | if nil == rfile then C("opening results file - " .. e) else |
613 | rfile:write(dumpTable(results, "", "results") .. "\nreturn results\n") | 615 | rfile:write(dumpTable(results, "", "results") .. "\nreturn results\n") |
614 | rfile:close() | 616 | rfile:close() |