mergin/client_pull.py
def download_file_finalize(job):
    """
    To be called when download_file_async is finished
    """
    job.executor.shutdown(wait=True)

    # make sure any exceptions from threads are not lost
    for future in job.futures:
        if future.exception() is not None:
            raise future.exception()

    job.mp.log.info("--- download finished")

    temp_dir = None
    for task in job.update_tasks:
        task.apply(job.directory, job.mp)
        if task.download_queue_items:
            temp_dir = os.path.dirname(task.download_queue_items[0].download_file_path)

    # Remove temporary download directory
    if temp_dir is not None:
        shutil.rmtree(temp_dir)

    To be called when download_file_async is finished
    
To be called when download_file_async is finished
To be called when download_file_async is finished
def download_file_finalize(job):
    job.executor.shutdown(wait=True)
    for future in job.futures:
        if future.exception() is not None:
            raise future.exception()
    job.mp.log.info("--- download finished")
    temp_dir = None
    for task in job.update_tasks:
        task.apply(job.directory, job.mp)
        if task.download_queue_items:
            temp_dir = os.path.dirname(task.download_queue_items[0].download_file_path)
    if temp_dir is not None:
        shutil.rmtree(temp_dir)
def download_file_finalize ( job ) : job . executor . shutdown ( wait = True ) for future in job . futures : if future . exception ( ) is not None : raise future . exception ( ) job . mp . log . info ( "--- download finished" ) temp_dir = None for task in job . update_tasks : task . apply ( job . directory , job . mp ) if task . download_queue_items : temp_dir = os . path . dirname ( task . download_queue_items [ 0 ] . download_file_path ) if temp_dir is not None : shutil . rmtree ( temp_dir )
To be called when download_file_async is finished
To be called when download_file_async is finished
"""
    To be called when download_file_async is finished
    """ # make sure any exceptions from threads are not lost # Remove temporary download directory
job