gears.debug: Print plain non-table values in dump_raw

dump_raw function wasn't printing the plain (non-table) value if the
tag was not specified.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Alexander Yakushev 2012-04-19 15:59:37 +03:00 committed by Uli Schlachter
parent f7aa4b5969
commit 394bacacea
1 changed files with 2 additions and 2 deletions

View File

@ -35,11 +35,11 @@ local function dump_raw(data, shift, tag)
local result = ""
if tag then
result = result .. tostring(tag) .. " : " .. tostring(data)
result = result .. tostring(tag) .. " : "
end
if type(data) ~= "table" then
return result .. " (" .. type(data) .. ")"
return result .. tostring(data) .. " (" .. type(data) .. ")"
end
shift = (shift or "") .. " "