• Julien Muchembled's avatar
    download: clean-up, fix, optimization · 84bb96e1
    Julien Muchembled authored
    An optimization is to avoid temporary file when possible: a rename
    (or hard link) is not always possible (different mount points).
    
    Another one is to not check md5sum twice when using cache file.
    
    Fall-back mode is ignored if an MD5 checksum is given.
    
    In case of checksum mismatch for a cached path, remove it and
    download again, mainly to cover the following cases:
    - the url content changes and the user updates the checksum
    - buildout killed while downloading directly to cache
      (see above optimization)
    - shutil.copyfile is interrupted
    84bb96e1
download.py 11.8 KB