def set_token(self, token):
        """
        Set token in authentification for next requests
        :param token: str. token to set in auth. If None, reinit auth
        """
        if token:
            auth = HTTPBasicAuth(token, '')
            self._token = token
            self.authenticated = True  # TODO: Remove this parameter
            self.session.auth = auth
            logger.debug("Using session token: %s", token)
        else:
            self._token = None
            self.authenticated = False
            self.session.auth = None
            logger.debug("Session token/auth reinitialised")
def set_token(self, token):
        """
        Set token in authentification for next requests
        :param token: str. token to set in auth. If None, reinit auth
        """
        if token:
            auth = HTTPBasicAuth(token, '')
            self._token = token
            self.authenticated = True  # TODO: Remove this parameter
            self.session.auth = auth
            logger.debug("Using session token: %s", token)
        else:
            self._token = None
            self.authenticated = False
            self.session.auth = None
            logger.debug("Session token/auth reinitialised")
def set_token ( self , token ) : if token : auth = HTTPBasicAuth ( token , '' ) self . _token = token self . authenticated = True # TODO: Remove this parameter self . session . auth = auth logger . debug ( "Using session token: %s" , token ) else : self . _token = None self . authenticated = False self . session . auth = None logger . debug ( "Session token/auth reinitialised" )
Set token in authentification for next requests
        :param token: str. token to set in auth. If None, reinit auth
Set token in authentification for next requests : param token : str . token to set in auth . If None reinit auth