Commit fd56030a authored by Pierre Ynard's avatar Pierre Ynard

luarc: simplify

parent 5e35aa8c
...@@ -608,8 +608,7 @@ end ...@@ -608,8 +608,7 @@ end
function call_libvlc_command(cmd,client,arg) function call_libvlc_command(cmd,client,arg)
local ok, vlcerr = pcall( vlc.var.libvlc_command, cmd, arg ) local ok, vlcerr = pcall( vlc.var.libvlc_command, cmd, arg )
if not ok then if not ok then
local a = arg or "" local a = arg and " "..arg or ""
if a ~= "" then a = " " .. a end
client:append("Error in `"..cmd..a.."' ".. vlcerr) -- when pcall fails, the 2nd arg is the error message. client:append("Error in `"..cmd..a.."' ".. vlcerr) -- when pcall fails, the 2nd arg is the error message.
end end
return vlcerr return vlcerr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment