Skip to content

Commit

Permalink
Merge pull request #71 from magnuhho/handle-download-errors
Browse files Browse the repository at this point in the history
conda_mirror.py: log download errors instead of breaking and clearing…
  • Loading branch information
parente committed Oct 18, 2018
2 parents eaaeaf8 + e3c9a0d commit 58f2a38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conda_mirror/conda_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,12 @@ def main(upstream_channel, target_directory, temp_directory, platform,
channel=channel,
platform=platform,
file_name=package_name)
_download(url, download_dir)
summary['downloaded'].add((url, download_dir))
try:
_download(url, download_dir)
summary['downloaded'].add((url, download_dir))
except Exception as ex:
logger.exception('Unexpected error %s: Aborting download', ex)
break

# validate all packages in the download directory
validation_results = _validate_packages(packages, download_dir,
Expand Down

0 comments on commit 58f2a38

Please sign in to comment.