From: Tobias Ulmer Date: Wed, 10 Jul 2013 18:09:19 +0000 (+0200) Subject: Remove unused global variable 'last_output' X-Git-Tag: e2factory-2.3.15rc1~476 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=e2262c37cbcabda22c0eb1795359b0ceeae74415;p=e2factory.git Remove unused global variable 'last_output' Signed-off-by: Tobias Ulmer --- diff --git a/generic/e2lib.lua b/generic/e2lib.lua index 4b76a5f..3e9d716 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -82,7 +82,6 @@ e2lib.globals = { hostname = nil, termwidth = 72, env = {}, - last_output = false, tmpdirs = {}, tmpfiles = {}, default_projects_server = "projects", @@ -1155,12 +1154,12 @@ end -- @return unknown function e2lib.callcmd_capture(cmd, capture) local rc, oread, owrite, devnull, pid + local function autocapture(...) local msg = table.concat({...}) e2lib.log(3, msg) - e2lib.globals.last_output = msg end - e2lib.globals.last_output = false + capture = capture or autocapture rc, oread, owrite = luafile.pipe() owrite:setlinebuf()