diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-01-30 23:17:30 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-01-30 23:17:30 +0000 |
commit | 0285f2e10b570d5ba4145fc7df0db875faff471a (patch) | |
tree | eb2039cf237ff55b8bd9640268a01676b9bdd57c /generate-html.lua | |
parent | bca6719794842040aaed7e231ca0e94856428b62 (diff) | |
download | alpine-mirror-status-0285f2e10b570d5ba4145fc7df0db875faff471a.tar.bz2 alpine-mirror-status-0285f2e10b570d5ba4145fc7df0db875faff471a.tar.xz |
switch mirrors source to alpine infra/mirrors repo
Diffstat (limited to 'generate-html.lua')
-rwxr-xr-x | generate-html.lua | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/generate-html.lua b/generate-html.lua index feb8caa..e3038ff 100755 --- a/generate-html.lua +++ b/generate-html.lua @@ -3,7 +3,6 @@ local json = require("cjson") local lustache = require("lustache") local yaml = require("lyaml") -local request = require("http.request") local utils = require("utils") local conf = require("config") @@ -128,12 +127,7 @@ end function get_mirrors() - local headers, stream = assert(request.new_from_uri(conf.mirrors_yaml):go()) - if headers:get(":status") ~= "200" then - error("Failed to get mirrors yaml!") - end - local y = assert(stream:get_body_as_string()) - local mirrors = yaml.load(y) + local mirrors = yaml.load(utils.read_file(conf.mirrors_yaml)) for a,mirror in pairs(mirrors) do mirrors[a].location = mirror.location or "Unknown" mirrors[a].bandwidth = mirror.bandwidth or "Unknown" |