Skip to content

Commit

Permalink
Fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkBaggett committed Oct 19, 2018
1 parent 6336428 commit 033375f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion domain_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ def do_GET(self):
self.wfile.write(str("No whois record for %s" % (params['tgt'])).encode("latin-1"))
return
except Exception as e:
print(e)
if "no match for" in str(e).lower():
domain_info={'domain_name': params['tgt'], 'time': time.time(),'status':"NOT FOUND"}
elif self.server.args.verbose:
else:
self.server.safe_print ("Error querying whois server: %s" % (str(e)))
return
#Put it in the cache
Expand Down

0 comments on commit 033375f

Please sign in to comment.