Skip to content

Commit

Permalink
domain_whois.py throws an unhanded exception if data[k] is none
Browse files Browse the repository at this point in the history
  • Loading branch information
ishamfazal committed Jan 9, 2018
1 parent 128b62c commit 07a71a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion domain/domain_whois.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def output(data, domain=""):
for k in ('creation_date', 'expiration_date', 'updated_date'):
if k in data:
date = data[k][0] if isinstance(data[k], list) else data[k]
data[k] = date.strftime('%m/%d/%Y')
if data[k]:
data[k] = date.strftime('%m/%d/%Y')
print data
print "\n-----------------------------\n"

Expand Down

0 comments on commit 07a71a3

Please sign in to comment.