Comment 2 for bug 244605

Revision history for this message
David Smid (dsmid) wrote :

I was wrong. There's nothing wrong with FetcherItem.setNextURL().

The problem is as follows:
When FetcherHandler downloads a file, the overall progress gets incremented but if the file doesn't validate (invalid checksum), Fetcher tries to download the same file from another mirror.
This new download increments overall progress as well. That means one file causes progress to be incremented twice.
When 'smart update' is near end of all downloads, current progress equals to total but there are still some files left.
When progress hits 100%, flag __done is set and that prevents Progress.setSub() from creating subprogress record for newly downloaded files. When FetcherItem.setSucceeded() is called upon successful download, it tries to call Progress.setSubDone() but since the subprogress item doesn't exist in dictionary, KeyError is thrown.