python-zk/kazoo — pull request #152 by rgs1 (2013-12-28 02:20:01+00:00)
Title: Make add_auth and add_auth_async consistent with the rest of the API

Even though ZK closes the connection when auth fails (though the session is
still valid!) it is nicer to have add_auth be consistent with the rest
of the API by setting an exception on the AsyncResult object. It is
also more consisent if the sync version has a return value as well (i.e.: True)
or an exception raised when it fails.

We still switch the state to KeeperState.AUTH_FAILED after failing (since the conexion
is closed by the server).

This change doesn't break the current behavior (except for adding the return
values which shouldn't break anything). It also makes the API docs correct :-)