Match all socket errors (DB host resolution)

Mac OS doesn't seem to raise socket.herror

On linux:

>>> import socket
>>> socket.gethostbyname_ex('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.herror: [Errno 1] Unknown host

On Mac OS:

>>> import socket
>>> socket.gethostbyname_ex('')
('', [], ['0.0.0.0'])