removed duplicated function
This commit is contained in:
parent
5b5c234592
commit
91c9a68b1d
1 changed files with 1 additions and 9 deletions
10
lg.py
10
lg.py
|
@ -24,6 +24,7 @@ from collections import defaultdict
|
|||
from logging.handlers import TimedRotatingFileHandler
|
||||
from urllib import quote, unquote
|
||||
from urllib2 import urlopen
|
||||
|
||||
import json
|
||||
import logging
|
||||
import memcache
|
||||
|
@ -60,15 +61,6 @@ def get_asn_from_as(n):
|
|||
return [field.strip() for field in data.split("|")]
|
||||
|
||||
|
||||
def get_asn_from_as(n):
|
||||
asn_zone = app.config.get("ASN_ZONE", "asn.cymru.com")
|
||||
try:
|
||||
data = resolve("AS%s.%s" % (n, asn_zone) ,"TXT").replace("'","").replace('"','')
|
||||
except:
|
||||
return " "*5
|
||||
return [ field.strip() for field in data.split("|") ]
|
||||
|
||||
|
||||
def add_links(text):
|
||||
"""Browser a string and replace ipv4, ipv6, as number, with a
|
||||
whois link """
|
||||
|
|
Loading…
Add table
Reference in a new issue