miketeo/pysmb — pull request #11 by scfarley (2014-08-20 18:33:43+00:00)
Title: Raise exceptions on connection issues

Use socket.connect() instead of connect_ex(), so the error is raised if
the port is incorrect since it is currently being lost. This change
will raise socket.error with errno.ECONNREFUSED during the connect
instead of errno.EPIPE during a send.