def _get_token(self, token, http_conn_id):
        """
        Given either a manually set token or a conn_id, return the webhook_token to use
        :param token: The manually provided token
        :type token: str
        :param http_conn_id: The conn_id provided
        :type http_conn_id: str
        :return: webhook_token (str) to use
        """
        if token:
            return token
        elif http_conn_id:
            conn = self.get_connection(http_conn_id)
            extra = conn.extra_dejson
            return extra.get('webhook_token', '')
        else:
            raise AirflowException('Cannot get token: No valid Slack '
                                   'webhook token nor conn_id supplied')
def _get_token(self, token, http_conn_id):
        """
        Given either a manually set token or a conn_id, return the webhook_token to use
        :param token: The manually provided token
        :type token: str
        :param http_conn_id: The conn_id provided
        :type http_conn_id: str
        :return: webhook_token (str) to use
        """
        if token:
            return token
        elif http_conn_id:
            conn = self.get_connection(http_conn_id)
            extra = conn.extra_dejson
            return extra.get('webhook_token', '')
        else:
            raise AirflowException('Cannot get token: No valid Slack '
                                   'webhook token nor conn_id supplied')
def _get_token ( self , token , http_conn_id ) : if token : return token elif http_conn_id : conn = self . get_connection ( http_conn_id ) extra = conn . extra_dejson return extra . get ( 'webhook_token' , '' ) else : raise AirflowException ( 'Cannot get token: No valid Slack ' 'webhook token nor conn_id supplied' )
Given either a manually set token or a conn_id, return the webhook_token to use
        :param token: The manually provided token
        :type token: str
        :param http_conn_id: The conn_id provided
        :type http_conn_id: str
        :return: webhook_token (str) to use
Given either a manually set token or a conn_id return the webhook_token to use : param token : The manually provided token : type token : str : param http_conn_id : The conn_id provided : type http_conn_id : str : return : webhook_token ( str ) to use