def set_active(self, username, active_state):

        if active_state not in (True, False):
            raise ValueError("active_state must be True or False")

        user = self.get_user(username)
        if user is None:
            return None

        if user['active'] is active_state:
            # Already in desired state
            return True

        user['active'] = active_state
        response = self._put(self.rest_url + "/user",
                             params={"username": username},
                             data=json.dumps(user))

        if response.status_code == 204:
            return True

        return None
Disconnect from the server.
dataset/ETHPy150Open pycontribs/python-crowd/crowd.py/CrowdServer.set_active--crossover with--dataset/ETHPy150Open jasonrbriggs/stomp.py/stomp/protocol.py/Protocol10.disconnect