sceptre/helpers.py
def execution_protection(func):
    """
    Raises an exception if a stack func is called with protection enabled.

    :param func: The function to protect.
    :type func: func
    :returns: The execution protected function.
    :rtype: func
    :raises: sceptre.exceptions.ProtectedStackError
    """
    logger = logging.getLogger(__name__)

    @wraps(func)
    def decorated(self, *args, **kwargs):
        if self.config.get("protect", False):
            logger.error(
                "%s Stack protected, action skipped", self.full_stack_name
            )
            raise ProtectedStackError("Stack protection is currently enabled")
        else:
            return func(self, *args, **kwargs)

    return decorated

    Raises an exception if a stack func is called with protection enabled.

    :param func: The function to protect.
    :type func: func
    :returns: The execution protected function.
    :rtype: func
    :raises: sceptre.exceptions.ProtectedStackError
    
Raises an exception if a stack func is called with protection enabled.
Raises an exception if a stack func is called with protection enabled .
def execution_protection(func):
    logger = logging.getLogger(__name__)
    @wraps(func)
    def decorated(self, *args, **kwargs):
        if self.config.get("protect", False):
            logger.error(
                "%s Stack protected, action skipped", self.full_stack_name
            )
            raise ProtectedStackError("Stack protection is currently enabled")
        else:
            return func(self, *args, **kwargs)
    return decorated
def execution_protection ( func ) : logger = logging . getLogger ( __name__ ) @ wraps ( func ) def decorated ( self , * args , ** kwargs ) : if self . config . get ( "protect" , False ) : logger . error ( "%s Stack protected, action skipped" , self . full_stack_name ) raise ProtectedStackError ( "Stack protection is currently enabled" ) else : return func ( self , * args , ** kwargs ) return decorated
Raises an exception if a stack func is called with protection enabled.
Raises an exception if a stack func is called with protection enabled .
"""
    Raises an exception if a stack func is called with protection enabled.

    :param func: The function to protect.
    :type func: func
    :returns: The execution protected function.
    :rtype: func
    :raises: sceptre.exceptions.ProtectedStackError
    """
The execution protected function.
The execution protected function .
func
None
func
The function to protect.
The function to protect .