pypet/environment.py
def _sigint_handling_single_run(kwargs):
    """Wrapper that allow graceful exits of single runs"""
    try:
        graceful_exit = kwargs['graceful_exit']

        if graceful_exit:
            sigint_handling.start()
            if sigint_handling.hit:
                result = (sigint_handling.SIGINT, None)
            else:
                result = _single_run(kwargs)
                if sigint_handling.hit:
                    result = (sigint_handling.SIGINT, result)
            return result
        return _single_run(kwargs)

    except:
        # Log traceback of exception
        pypet_root_logger = logging.getLogger('pypet')
        pypet_root_logger.exception('ERROR occurred during a single run! ')
        raise
def _sigint_handling_single_run(kwargs):
    try:
        graceful_exit = kwargs['graceful_exit']

        if graceful_exit:
            sigint_handling.start()
            if sigint_handling.hit:
                result = (sigint_handling.SIGINT, None)
            else:
                result = _single_run(kwargs)
                if sigint_handling.hit:
                    result = (sigint_handling.SIGINT, result)
            return result
        return _single_run(kwargs)

    except:
        # Log traceback of exception
        pypet_root_logger = logging.getLogger('pypet')
        pypet_root_logger.exception('ERROR occurred during a single run! ')
        raise
def _sigint_handling_single_run ( kwargs ) : try : graceful_exit = kwargs [ 'graceful_exit' ] if graceful_exit : sigint_handling . start ( ) if sigint_handling . hit : result = ( sigint_handling . SIGINT , None ) else : result = _single_run ( kwargs ) if sigint_handling . hit : result = ( sigint_handling . SIGINT , result ) return result return _single_run ( kwargs ) except : # Log traceback of exception pypet_root_logger = logging . getLogger ( 'pypet' ) pypet_root_logger . exception ( 'ERROR occurred during a single run! ' ) raise
Wrapper that allow graceful exits of single runs
Wrapper that allow graceful exits of single runs