diff options
author | Giovanni Giacobbi <giovanni@giacobbi.net> | 2021-01-16 15:30:03 +0100 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2021-01-20 17:48:16 +0200 |
commit | af422b192462813150863752f9c300af55df4996 (patch) | |
tree | ef07c2f73da55ba53792d792e287674f01ddd535 /modules/luci-base/luasrc | |
parent | d3280e6f5df17b799230e229c9472cf8854015ae (diff) |
treewide: removed trailing whitespaces and extra newlines in 'modules'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
Diffstat (limited to 'modules/luci-base/luasrc')
-rw-r--r-- | modules/luci-base/luasrc/ccache.lua | 2 | ||||
-rw-r--r-- | modules/luci-base/luasrc/sgi/cgi.lua | 4 | ||||
-rw-r--r-- | modules/luci-base/luasrc/template.lua | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/modules/luci-base/luasrc/ccache.lua b/modules/luci-base/luasrc/ccache.lua index bcc76e6a7b..d3be7cba6c 100644 --- a/modules/luci-base/luasrc/ccache.lua +++ b/modules/luci-base/luasrc/ccache.lua @@ -61,7 +61,7 @@ function cache_enable(cachepath, mode) package.loaders[2] = function(mod) local encoded = cachepath .. "/" .. _encode_filename(mod) local modcons = _load_sane(encoded) - + if modcons then return modcons end diff --git a/modules/luci-base/luasrc/sgi/cgi.lua b/modules/luci-base/luasrc/sgi/cgi.lua index 68ae17a9eb..400db4710d 100644 --- a/modules/luci-base/luasrc/sgi/cgi.lua +++ b/modules/luci-base/luasrc/sgi/cgi.lua @@ -35,11 +35,11 @@ function run() limitsource(io.stdin, tonumber(luci.sys.getenv("CONTENT_LENGTH"))), ltn12.sink.file(io.stderr) ) - + local x = coroutine.create(luci.dispatcher.httpdispatch) local hcache = "" local active = true - + while coroutine.status(x) ~= "dead" do local res, id, data1, data2 = coroutine.resume(x, r) diff --git a/modules/luci-base/luasrc/template.lua b/modules/luci-base/luasrc/template.lua index cd9b73b22b..3955bd76f3 100644 --- a/modules/luci-base/luasrc/template.lua +++ b/modules/luci-base/luasrc/template.lua @@ -53,7 +53,7 @@ function Template.__init__(self, name, template) -- Create a new namespace for this template self.viewns = context.viewns - + -- If we have a cached template, skip compiling and loading if not self.template then @@ -84,13 +84,13 @@ end -- Renders a template function Template.render(self, scope) scope = scope or getfenv(2) - + -- Put our predefined objects in the scope of the template setfenv(self.template, setmetatable({}, {__index = function(tbl, key) return rawget(tbl, key) or self.viewns[key] or scope[key] end})) - + -- Now finally render the thing local stat, err = util.copcall(self.template) if not stat then |