miketeo/pysmb — pull request #10 by scfarley (2014-08-07 19:24:59+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.