loady/files.py
def remove_on_exception(dirname, remove=True):
    """Creates a directory, yields to the caller, and removes that directory
       if an exception is thrown."""
    os.makedirs(dirname)
    try:
        yield
    except:
        if remove:
            shutil.rmtree(dirname, ignore_errors=True)
        raise
Creates a directory, yields to the caller, and removes that directory
       if an exception is thrown.
Creates a directory, yields to the caller, and removes that directory
if an exception is thrown.
Creates a directory yields to the caller and removes that directory if an exception is thrown .
def remove_on_exception(dirname, remove=True):
    os.makedirs(dirname)
    try:
        yield
    except:
        if remove:
            shutil.rmtree(dirname, ignore_errors=True)
        raise
def remove_on_exception ( dirname , remove = True ) : os . makedirs ( dirname ) try : yield except : if remove : shutil . rmtree ( dirname , ignore_errors = True ) raise
Creates a directory, yields to the caller, and removes that directory
if an exception is thrown.
Creates a directory yields to the caller and removes that directory if an exception is thrown .
"""Creates a directory, yields to the caller, and removes that directory
       if an exception is thrown."""
dirname
remove