reverse_dns will throw herror "Unknown host" exceptions on IP addresses that don't have a PTR record.
>>> import utilitybelt as ub
>>> ub.reverse_dns('1.54.140.138')
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "<input>", line 3, in reverse_dns
herror: [Errno 1] Unknown host
>>> print "why python gods why!"
why python gods why!