theano/gof/cmodule.py
def _rmtree(parent, ignore_nocleanup=False, msg='', level=logging.DEBUG,
            ignore_if_missing=False):
    """
    On NFS filesystems, it is impossible to delete a directory with open
    files in it.

    So instead, some commands in this file will respond to a
    failed rmtree() by touching a 'delete.me' file.  This file is a message
    for a future process to try deleting the directory.

    Parameters:
    ----------
    parent
        Root node to start deleting from
    ignore_nocleanup
        Delete the tree if flag is TRUE
    level
        Python Logging level. Set to "DEBUG" by default
    ignore_if_missing
        If set to True, just return without any issue if parent is NULL
    """
    if ignore_if_missing and not os.path.exists(parent):
        return
    try:
        if ignore_nocleanup or not config.nocleanup:
            log_msg = 'Deleting'
            if msg:
                log_msg += ' (%s)' % msg
            _logger.log(level, '%s: %s', log_msg, parent)
            shutil.rmtree(parent)
    except Exception as e:
        # If parent still exists, mark it for deletion by a future refresh()
        _logger.debug('In _rmtree, encountered exception: %s(%s)',
                      type(e), e)
        if os.path.exists(parent):
            try:
                _logger.info('placing "delete.me" in %s', parent)
                open(os.path.join(parent, 'delete.me'), 'w').close()
            except Exception as ee:
                _logger.warning("Failed to remove or mark cache directory %s "
                                "for removal %s", parent, ee)

    On NFS filesystems, it is impossible to delete a directory with open
    files in it.

    So instead, some commands in this file will respond to a
    failed rmtree() by touching a 'delete.me' file.  This file is a message
    for a future process to try deleting the directory.

    Parameters:
    ----------
    parent
        Root node to start deleting from
    ignore_nocleanup
        Delete the tree if flag is TRUE
    level
        Python Logging level. Set to "DEBUG" by default
    ignore_if_missing
        If set to True, just return without any issue if parent is NULL
    
On NFS filesystems, it is impossible to delete a directory with open
files in it.

So instead, some commands in this file will respond to a
failed rmtree() by touching a 'delete.me' file.  This file is a message
for a future process to try deleting the directory.



parent
Root node to start deleting from
ignore_nocleanup
Delete the tree if flag is TRUE
level
Python Logging level. Set to "DEBUG" by default
ignore_if_missing
If set to True, just return without any issue if parent is NULL
On NFS filesystems it is impossible to delete a directory with open files in it . So instead some commands in this file will respond to a failed rmtree () by touching a ' delete . me ' file . This file is a message for a future process to try deleting the directory . parent Root node to start deleting from ignore_nocleanup Delete the tree if flag is TRUE level Python Logging level . Set to " DEBUG " by default ignore_if_missing If set to True just return without any issue if parent is NULL
def _rmtree(parent, ignore_nocleanup=False, msg='', level=logging.DEBUG,
            ignore_if_missing=False):
    if ignore_if_missing and not os.path.exists(parent):
        return
    try:
        if ignore_nocleanup or not config.nocleanup:
            log_msg = 'Deleting'
            if msg:
                log_msg += ' (%s)' % msg
            _logger.log(level, '%s: %s', log_msg, parent)
            shutil.rmtree(parent)
    except Exception as e:
        _logger.debug('In _rmtree, encountered exception: %s(%s)',
                      type(e), e)
        if os.path.exists(parent):
            try:
                _logger.info('placing "delete.me" in %s', parent)
                open(os.path.join(parent, 'delete.me'), 'w').close()
            except Exception as ee:
                _logger.warning("Failed to remove or mark cache directory %s "
                                "for removal %s", parent, ee)
def _rmtree ( parent , ignore_nocleanup = False , msg = '' , level = logging . DEBUG , ignore_if_missing = False ) : if ignore_if_missing and not os . path . exists ( parent ) : return try : if ignore_nocleanup or not config . nocleanup : log_msg = 'Deleting' if msg : log_msg += ' (%s)' % msg _logger . log ( level , '%s: %s' , log_msg , parent ) shutil . rmtree ( parent ) except Exception as e : _logger . debug ( 'In _rmtree, encountered exception: %s(%s)' , type ( e ) , e ) if os . path . exists ( parent ) : try : _logger . info ( 'placing "delete.me" in %s' , parent ) open ( os . path . join ( parent , 'delete.me' ) , 'w' ) . close ( ) except Exception as ee : _logger . warning ( "Failed to remove or mark cache directory %s " "for removal %s" , parent , ee )
On NFS filesystems, it is impossible to delete a directory with open
files in it.
On NFS filesystems it is impossible to delete a directory with open files in it .
"""
    On NFS filesystems, it is impossible to delete a directory with open
    files in it.

    So instead, some commands in this file will respond to a
    failed rmtree() by touching a 'delete.me' file.  This file is a message
    for a future process to try deleting the directory.

    Parameters:
    ----------
    parent
        Root node to start deleting from
    ignore_nocleanup
        Delete the tree if flag is TRUE
    level
        Python Logging level. Set to "DEBUG" by default
    ignore_if_missing
        If set to True, just return without any issue if parent is NULL
    """ # If parent still exists, mark it for deletion by a future refresh()
parent
ignore_nocleanup
msg
level
ignore_if_missing