From baf9c00cc53f8c6a75a7e0884c5a49d7b40989a4 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Fri, 10 Nov 2023 12:10:04 -0500 Subject: [PATCH] cleanup --- src/wags_tails/utils/downloads.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/wags_tails/utils/downloads.py b/src/wags_tails/utils/downloads.py index 10a28f0..23b167d 100644 --- a/src/wags_tails/utils/downloads.py +++ b/src/wags_tails/utils/downloads.py @@ -4,7 +4,6 @@ import re import tempfile import zipfile -from ftplib import FTP from pathlib import Path from typing import Callable, Dict, Optional @@ -32,22 +31,6 @@ def handle_zip(dl_path: Path, outfile_path: Path) -> None: os.remove(dl_path) -def download_ftp(host: str, file_dir: str, file_name: str, outfile: Path) -> None: - """Perform FTP download of remote data file. - - :param host: FTP server hostname - :param file_dir: directory path to file - :param file_name: name of file on server - :param outfile: location to save file to - """ - with FTP(host) as ftp: - ftp.login() - ftp.cwd(file_dir) - with open(outfile, "wb") as fp: - # TODO tqdm this - ftp.retrbinary(f"RETR {file_name}", fp.write) - - def download_http( url: str, outfile_path: Path,