Download the provided file URL
(logger, s, file_reference, data_dir, jobs_manager)
| 208 | |
| 209 | |
| 210 | def download_remote_files(logger, s, file_reference, data_dir, jobs_manager): |
| 211 | """ |
| 212 | Download the provided file URL |
| 213 | """ |
| 214 | subprocess.run("rm " + data_dir + "*", shell=True) |
| 215 | |
| 216 | dns_file = download_file(s, file_reference, data_dir) |
| 217 | |
| 218 | logger.info("Downloading file") |
| 219 | |
| 220 | try: |
| 221 | subprocess.run(["gunzip", dns_file], check=True) |
| 222 | except: |
| 223 | logger.error("Could not unzip file: " + dns_file) |
| 224 | jobs_manager.record_job_error() |
| 225 | exit(1) |
| 226 | |
| 227 | unzipped_dns = dns_file.replace(".gz", "") |
| 228 | |
| 229 | return unzipped_dns |
| 230 | |
| 231 | |
| 232 | def check_save_location(location): |
no test coverage detected