toastdriven/pysolr — pull request #54 by acdha (2012-10-05 17:54:28+00:00)
Title: Catch low-level socket-failures in _send_request

httplib2 can raise a bare socket.error in _send_request, which handles only
AttributeError. Socket-level failures in httplib weren't caught at all.

This change catches all IOError subclasses (socket.error, socket.readline,
etc.), tells logging to include exception information and moves logging code
outside of the try/except block to avoid any possibility of an exception in a
log handler being caught by mistake.