lua - fix pcall for asn/country mmdb lookup
This commit is contained in:
parent
04019a617a
commit
6afdb298fa
|
@ -374,10 +374,10 @@ jobs:
|
|||
run: cat /opt/.runner_env >> $GITHUB_ENV
|
||||
|
||||
# Run tests
|
||||
# - name: Run Docker tests
|
||||
# run: ./tests/main.py "docker"
|
||||
# - name: Run Autoconf tests
|
||||
# run: ./tests/main.py "autoconf"
|
||||
- name: Run Docker tests
|
||||
run: ./tests/main.py "docker"
|
||||
- name: Run Autoconf tests
|
||||
run: ./tests/main.py "autoconf"
|
||||
- name: Run Swarm tests
|
||||
run: ./tests/main.py "swarm"
|
||||
- name: Run Kubernetes tests
|
||||
|
|
|
@ -317,7 +317,7 @@ utils.get_country = function(ip)
|
|||
if not mmdb.country_db then
|
||||
return false, "mmdb country not loaded"
|
||||
end
|
||||
local ok, result, err = pcall(mmdb.country_db:lookup(ip))
|
||||
local ok, result, err = pcall(mmdb.country_db.lookup, mmdb.country_db, ip)
|
||||
if not ok then
|
||||
return nil, result
|
||||
end
|
||||
|
@ -331,7 +331,7 @@ utils.get_asn = function(ip)
|
|||
if not mmdb.asn_db then
|
||||
return false, "mmdb asn not loaded"
|
||||
end
|
||||
local ok, result, err = pcall(mmdb.asn_db:lookup(ip))
|
||||
local ok, result, err = pcall(mmdb.asn_db.lookup, mmdb.asn_db, ip)
|
||||
if not ok then
|
||||
return nil, result
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue