update python client with NO_LONGER_MASTER exception