mergin/client_pull.py
def _cleanup_failed_download(directory, mergin_project=None):
    """
    If a download job fails, there will be the newly created directory left behind with some
    temporary files in it. We want to remove it because a new download would fail because
    the directory already exists.
    """
    # First try to get the Mergin project logger and remove its handlers to allow the log file deletion
    if mergin_project is not None:
        mergin_project.remove_logging_handler()

    shutil.rmtree(directory)

    If a download job fails, there will be the newly created directory left behind with some
    temporary files in it. We want to remove it because a new download would fail because
    the directory already exists.
    
If a download job fails, there will be the newly created directory left behind with some
temporary files in it. We want to remove it because a new download would fail because
the directory already exists.
If a download job fails there will be the newly created directory left behind with some temporary files in it . We want to remove it because a new download would fail because the directory already exists .
def _cleanup_failed_download(directory, mergin_project=None):
    if mergin_project is not None:
        mergin_project.remove_logging_handler()
    shutil.rmtree(directory)
def _cleanup_failed_download ( directory , mergin_project = None ) : if mergin_project is not None : mergin_project . remove_logging_handler ( ) shutil . rmtree ( directory )
If a download job fails, there will be the newly created directory left behind with some
temporary files in it.
If a download job fails there will be the newly created directory left behind with some temporary files in it .
"""
    If a download job fails, there will be the newly created directory left behind with some
    temporary files in it. We want to remove it because a new download would fail because
    the directory already exists.
    """ # First try to get the Mergin project logger and remove its handlers to allow the log file deletion
directory
mergin_project