<HTML><BODY><div>Hi Sergey, thank you for the patch, LGTM.<br><br> <blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Среда, 8 апреля 2020, 18:43 +03:00 от Sergey Bronnikov <estetus@gmail.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><style type="text/css"></style><div><div id="style_15863606131773170986_BODY">From: Sergey Bronnikov <<a href="/compose?To=sergeyb@tarantool.org">sergeyb@tarantool.org</a>><br><br>Closes #4681<br>---<br> extra/dist/tarantoolctl.in | 20 +++++++++-----------<br> 1 file changed, 9 insertions(+), 11 deletions(-)<br><br>diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in<br>index f5a912ccd..3bcbe5b79 100755<br>--- a/extra/dist/tarantoolctl.in<br>+++ b/extra/dist/tarantoolctl.in<br>@@ -46,7 +46,6 @@ local instance_dir<br> local default_cfg<br> local positional_arguments<br> local keyword_arguments<br>-local lua_arguments = arg<br> local language<br> <br> -- function for printing usage reference<br>@@ -64,7 +63,7 @@ end<br> <br> local function check_user_level()<br> local uid = os.getenv('UID')<br>- local udir = nil<br>+ local udir<br> if uid == 0 or os.getenv("NOTIFY_SOCKET") then<br> return nil<br> end<br>@@ -420,7 +419,7 @@ local cat_formats = setmetatable({<br> json = cat_json_cb,<br> lua = cat_lua_cb,<br> }, {<br>- __index = function(self, cmd)<br>+ __index = function(cmd)<br> error(("Unknown formatter '%s'"):format(cmd))<br> end<br> })<br>@@ -790,7 +789,7 @@ end<br> local function eval()<br> local console_sock_path = uri.parse(console_sock).service<br> local filename = arg[3]<br>- local code = nil<br>+ local code<br> if filename == nil then<br> if stdin_isatty() then<br> log.error("Usage:")<br>@@ -848,7 +847,6 @@ end<br> -- xlog / snap file, so even when it stops on LSN >= @a opts.to on<br> -- a current file a next file will be processed.<br> local function filter_xlog(gen, param, state, opts, cb)<br>- local spaces = opts.spaces<br> local from, to, spaces = opts.from, opts.to, opts.space<br> local show_system, replicas = opts['show-system'], opts.replica<br> <br>@@ -875,7 +873,7 @@ local function cat()<br> local cat_format = opts.format<br> local format_cb = cat_formats[cat_format]<br> local is_printed = false<br>- for id, file in ipairs(positional_arguments) do<br>+ for _, file in ipairs(positional_arguments) do<br> log.error("Processing file '%s'", file)<br> local gen, param, state = xlog.pairs(file)<br> filter_xlog(gen, param, state, opts, function(record)<br>@@ -901,7 +899,7 @@ local function play()<br> if not remote:wait_connected() then<br> error(("Error while connecting to host '%s'"):format(uri))<br> end<br>- for id, file in ipairs(positional_arguments) do<br>+ for _, file in ipairs(positional_arguments) do<br> log.info(("Processing file '%s'"):format(file))<br> local gen, param, state = xlog.pairs(file)<br> filter_xlog(gen, param, state, opts, function(record)<br>@@ -923,7 +921,7 @@ local function play()<br> end<br> <br> local function find_arg(name_arg)<br>- for i, key in ipairs(arg) do<br>+ for _, key in ipairs(arg) do<br> if key:find(name_arg) ~= nil then<br> return key<br> end<br>@@ -937,7 +935,7 @@ local function rocks()<br> local util = require("luarocks.util")<br> local command_line = require("luarocks.cmd")<br> local options = keyword_arguments<br>- local key = nil<br>+ local key<br> if options["only-server"] ~= nil then<br> key = find_arg("only%-server")<br> else<br>@@ -954,7 +952,7 @@ local function rocks()<br> end<br> <br> -- Tweak help messages<br>- util.see_help = function(command, program)<br>+ util.see_help = function()<br> -- TODO: print extended help message here<br> return "See Tarantool documentation for help."<br> end<br>@@ -1321,7 +1319,7 @@ local function usage_command(name, cmd)<br> if type(header) == 'string' then<br> header = { header }<br> end<br>- for no, line in ipairs(header) do<br>+ for _, line in ipairs(header) do<br> log.error(" " .. line, name)<br> end<br> end<br>--<br>2.23.0<br> </div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Alexander Tikhonov</div></div></div><div> </div></div></BODY></HTML>