webmcp
changeset 65:a54cc7dcabf1
"extos" library calls via "extos." instead of "os."
author | jbe |
---|---|
date | Tue Apr 17 15:20:42 2012 +0200 (2012-04-17) |
parents | 3d43a5cf17c1 |
children | afed1ab1477f |
files | framework/bin/langtool.lua framework/cgi-bin/webmcp.lua framework/env/auth/openid/_curl.lua framework/env/execute/_add_filters_by_path.lua framework/env/net/send_mail.lua framework/env/trace/_render_sub_tree.lua |
line diff
1.1 --- a/framework/bin/langtool.lua Sun Apr 15 16:04:33 2012 +0200 1.2 +++ b/framework/bin/langtool.lua Tue Apr 17 15:20:42 2012 +0200 1.3 @@ -64,7 +64,7 @@ 1.4 end 1.5 end 1.6 1.7 -if #directories > 0 and not os.listdir then 1.8 +if #directories > 0 and not extos.listdir then 1.9 io.stderr:write('Fatal: Cannot traverse directories without "extos" library -> Abort\n') 1.10 os.exit(1) 1.11 end 1.12 @@ -81,7 +81,7 @@ 1.13 local translations = { } 1.14 1.15 local function traverse(path) 1.16 - local filenames = os.listdir(path) 1.17 + local filenames = extos.listdir(path) 1.18 if not filenames then return false end 1.19 for num, filename in ipairs(filenames) do 1.20 if not string.find(filename, "^%.") then
2.1 --- a/framework/cgi-bin/webmcp.lua Sun Apr 15 16:04:33 2012 +0200 2.2 +++ b/framework/cgi-bin/webmcp.lua Tue Apr 17 15:20:42 2012 +0200 2.3 @@ -387,7 +387,7 @@ 2.4 if not success then trace.error{} end 2.5 2.6 -- laufzeitermittlung 2.7 -trace.exectime{ real = os.monotonic_hires_time(), cpu = os.clock() } 2.8 +trace.exectime{ real = extos.monotonic_hires_time(), cpu = os.clock() } 2.9 2.10 slot.select('trace', trace.render) -- render trace information 2.11
3.1 --- a/framework/env/auth/openid/_curl.lua Sun Apr 15 16:04:33 2012 +0200 3.2 +++ b/framework/env/auth/openid/_curl.lua Tue Apr 17 15:20:42 2012 +0200 3.3 @@ -6,7 +6,7 @@ 3.4 local options = table.new(curl_options) 3.5 options[#options+1] = "-i" 3.6 options[#options+1] = url 3.7 - local stdout, errmsg, status = os.pfilter(nil, "curl", table.unpack(options)) 3.8 + local stdout, errmsg, status = extos.pfilter(nil, "curl", table.unpack(options)) 3.9 if not stdout then 3.10 error("Error while executing curl: " .. errmsg) 3.11 end
4.1 --- a/framework/env/execute/_add_filters_by_path.lua Sun Apr 15 16:04:33 2012 +0200 4.2 +++ b/framework/env/execute/_add_filters_by_path.lua Tue Apr 17 15:20:42 2012 +0200 4.3 @@ -1,7 +1,7 @@ 4.4 function execute._add_filters_by_path(filter_list, ...) 4.5 local full_path = encode.file_path(request.get_app_basepath(), "app", ...) 4.6 local relative_path = encode.file_path("", ...) 4.7 - local filter_names = os.listdir(full_path) 4.8 + local filter_names = extos.listdir(full_path) 4.9 if filter_names then 4.10 table.sort(filter_names) -- not really neccessary, due to sorting afterwards 4.11 for i, filter_name in ipairs(filter_names) do
5.1 --- a/framework/env/net/send_mail.lua Sun Apr 15 16:04:33 2012 +0200 5.2 +++ b/framework/env/net/send_mail.lua Tue Apr 17 15:20:42 2012 +0200 5.3 @@ -46,7 +46,7 @@ 5.4 command[#command+1] = "-f" 5.5 command[#command+1] = envelope_from 5.6 end 5.7 - local stdout, errmsg, status = os.pfilter(mail, table.unpack(command)) 5.8 + local stdout, errmsg, status = extos.pfilter(mail, table.unpack(command)) 5.9 if not status then 5.10 error("Error while calling sendmail: " .. errmsg) 5.11 end
6.1 --- a/framework/env/trace/_render_sub_tree.lua Sun Apr 15 16:04:33 2012 +0200 6.2 +++ b/framework/env/trace/_render_sub_tree.lua Tue Apr 17 15:20:42 2012 +0200 6.3 @@ -140,7 +140,7 @@ 6.4 open_head() 6.5 slot.put( 6.6 "Finished after " .. 6.7 - string.format("%.1f", os.monotonic_hires_time() * 1000) .. 6.8 + string.format("%.1f", extos.monotonic_hires_time() * 1000) .. 6.9 ' ms (' .. 6.10 string.format("%.1f", os.clock() * 1000) .. 6.11 ' ms CPU)'