From 91c9a68b1d0bb653e6b5e11ea97c834954183f2d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 4 Apr 2015 18:12:33 +0200 Subject: [PATCH] removed duplicated function --- lg.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lg.py b/lg.py index 21781a3..47ed204 100644 --- a/lg.py +++ b/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 """