def ensure_local(index_url, file_path, local_cache_path, force=False, progress_advance=None): localfiles = LocalFiles(local_cache_path, serverfiles=ServerFiles(server=index_url)) if force: localfiles.download(*file_path, callback=progress_advance) return localfiles.localpath_download(*file_path, callback=progress_advance)
def ensure_local(domain, filename, force=False, progress_advance=None): localfiles = LocalFiles(local_cache_path(), serverfiles=ServerFiles(server=INDEX_URL)) if force: localfiles.download(domain, filename, callback=progress_advance) return localfiles.localpath_download(domain, filename, callback=progress_advance)
def ensure_local(index_url, file_path, local_cache_path, force=False, progress_advance=None): localfiles = LocalFiles(local_cache_path, serverfiles=ServerFiles(server=index_url)) if force: localfiles.download(*file_path, callback=progress_advance) return localfiles.localpath_download(*file_path, callback=progress_advance)