Clean up imports
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
ab36cc85e8
commit
20797b44cd
14
plugin.py
14
plugin.py
@ -29,14 +29,8 @@
|
|||||||
###
|
###
|
||||||
|
|
||||||
from supybot import (
|
from supybot import (
|
||||||
utils,
|
|
||||||
plugins,
|
|
||||||
ircutils,
|
ircutils,
|
||||||
callbacks,
|
callbacks,
|
||||||
ircdb,
|
|
||||||
conf,
|
|
||||||
log,
|
|
||||||
world,
|
|
||||||
ircmsgs,
|
ircmsgs,
|
||||||
)
|
)
|
||||||
from supybot.commands import *
|
from supybot.commands import *
|
||||||
@ -51,15 +45,11 @@ except ImportError:
|
|||||||
_ = lambda x: x
|
_ = lambda x: x
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import time
|
|
||||||
import sqlite3
|
|
||||||
import redis
|
import redis
|
||||||
import json
|
import json
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from ipwhois import IPWhois
|
from ipwhois import IPWhois
|
||||||
import ipwhois
|
from ipwhois.exceptions import IPDefinedError
|
||||||
|
|
||||||
|
|
||||||
class SnoParser(callbacks.Plugin):
|
class SnoParser(callbacks.Plugin):
|
||||||
@ -135,7 +125,7 @@ class SnoParser(callbacks.Plugin):
|
|||||||
country = whoisres["asn_country_code"]
|
country = whoisres["asn_country_code"]
|
||||||
description = whoisres["asn_description"]
|
description = whoisres["asn_description"]
|
||||||
whoisout = asn + " " + country + " " + description
|
whoisout = asn + " " + country + " " + description
|
||||||
except ipwhois.exceptions.IPDefinedError:
|
except IPDefinedError:
|
||||||
whoisout = "RFC 4291 (Local)"
|
whoisout = "RFC 4291 (Local)"
|
||||||
|
|
||||||
response = whoisout
|
response = whoisout
|
||||||
|
Loading…
Reference in New Issue
Block a user