removed duplicated function

This commit is contained in:
Steffen Vogel 2015-04-04 18:12:33 +02:00
parent 5b5c234592
commit 91c9a68b1d

10
lg.py
View file

@ -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 """