News download: Fix regressiont hat caused the delay parameter in recipes to not actually delay downloads. Fixes #9332 (delay in recipe does not work as intended)

This commit is contained in:
Kovid Goyal 2011-03-07 20:00:29 -07:00
parent bfd77656a6
commit 965ffa057d

View File

@ -194,7 +194,7 @@ class RecursiveFetcher(object):
self.log.debug('Fetching', url)
delta = time.time() - self.last_fetch_at
if delta < self.delay:
time.sleep(delta)
time.sleep(self.delay - delta)
if isinstance(url, unicode):
url = url.encode('utf-8')
# Not sure is this is really needed as I think mechanize