pep8
This commit is contained in:
parent
715f926846
commit
79b4f15b45
3 changed files with 17 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
from util import pywhois, hook
|
||||
|
||||
|
||||
@hook.command
|
||||
def whois(inp, say=None):
|
||||
".whois <domain> -- Look up ownership infomation for <domain>"
|
||||
|
@ -13,28 +14,29 @@ def whois(inp, say=None):
|
|||
try:
|
||||
domain_name = w.domain_name[0]
|
||||
except IndexError, e:
|
||||
domain_name="none."
|
||||
domain_name = "None"
|
||||
|
||||
try:
|
||||
expiration_date = w.expiration_date[0]
|
||||
except IndexError, e:
|
||||
expiration_date="none."
|
||||
expiration_date = "None"
|
||||
|
||||
try:
|
||||
creation_date = w.creation_date[0]
|
||||
except IndexError, e:
|
||||
creation_date="none."
|
||||
creation_date = "None"
|
||||
|
||||
try:
|
||||
registrant_email = w.emails[0]
|
||||
except:
|
||||
registrant_email="none."
|
||||
registrant_email = "None"
|
||||
|
||||
try:
|
||||
administrative_email = w.emails[1]
|
||||
except:
|
||||
administrative_email="none."
|
||||
|
||||
say('Domain recognised! %s was registered on \x02%s\x02 and will expire on \x02%s\x02' % (domain_name, creation_date, expiration_date))
|
||||
say('Registrant email: %s Administrative email: %s' % (registrant_email, administrative_email))
|
||||
administrative_email = "None"
|
||||
|
||||
say("Domain recognised! %s was registered on \x02%s\x02 and will "\
|
||||
"expire on \x02%s\x02" % (domain_name, creation_date, expiration_date))
|
||||
say("Registrant email: %s "\
|
||||
"Administrative email: %s" % (registrant_email, administrative_email))
|
||||
|
|
Reference in a new issue