'Collect done downloads and add their data to the MHTML file.
This is needed if a download finishes before attaching its
finished signal.'

def _collect_zombies(self):

    items = set(((url, item) for (url, item) in self.pending_downloads if item.done))
    log.downloads.debug('Zombie    downloads:    {}'.format(items))
    for (url, item) in items:
        self._finished(url, item)
