Skip to content

Commit 84815f6

Browse files
committed
add vpn-ip-lookups (fix #9)
1 parent 1b4ef52 commit 84815f6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/riskdb/api/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,12 @@ def _init_asn_kind() -> dict:
244244
data[k] = []
245245
if v.is_file():
246246
with open(v, 'r', encoding='utf-8') as _f:
247-
data[k] = [l.strip() for l in _f.readlines()]
247+
for l in f.readlines():
248+
try:
249+
data[k].append(int(l.strip()))
250+
251+
except ValueError:
252+
continue
248253

249254
# dynamically detected ones
250255
for asn, v in ASN_DATA.items():

0 commit comments

Comments
 (0)