Closed evgeni closed 3 months ago
I did read https://github.com/python/cpython/blob/main/Lib/urllib/request.py before opening this PR, and from the code itself: none.
Obviously, any line could itself raise something w/o an explicit raise
, but oh well…
sometimes urlretrieve will not get the whole file and raise a ContentTooShortError. it will not delete the partially downloaded file in this case, which in a later run will cause issues as "the file is already there" but "it's not a valid RPM file".
instead, catch the ContentTooShortError and try to delete the file