fdutils/decorators.py
def try_silent(return_value=None, expected_exception=Exception):
    """ try a function and if fail do not raise exception. use cautiously

    :return:
    """
    def real_function(f):
        @wraps(f)
        def wrapper(*args, **kwargs):
            try:
                return f(*args, **kwargs)
            except expected_exception:
                log.exception('Function Error was executed and failed silently')
                return return_value
        return wrapper
    return real_function
 try a function and if fail do not raise exception. use cautiously

    :return:
    
try a function and if fail do not raise exception. use cautiously
try a function and if fail do not raise exception . use cautiously
def try_silent(return_value=None, expected_exception=Exception):
    def real_function(f):
        @wraps(f)
        def wrapper(*args, **kwargs):
            try:
                return f(*args, **kwargs)
            except expected_exception:
                log.exception('Function Error was executed and failed silently')
                return return_value
        return wrapper
    return real_function
def try_silent ( return_value = None , expected_exception = Exception ) : def real_function ( f ) : @ wraps ( f ) def wrapper ( * args , ** kwargs ) : try : return f ( * args , ** kwargs ) except expected_exception : log . exception ( 'Function Error was executed and failed silently' ) return return_value return wrapper return real_function
try a function and if fail do not raise exception.
try a function and if fail do not raise exception .
""" try a function and if fail do not raise exception. use cautiously

    :return:
    """
None
return_value
expected_exception