mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
bfd77656a6
commit
965ffa057d
@ -194,7 +194,7 @@ class RecursiveFetcher(object):
|
|||||||
self.log.debug('Fetching', url)
|
self.log.debug('Fetching', url)
|
||||||
delta = time.time() - self.last_fetch_at
|
delta = time.time() - self.last_fetch_at
|
||||||
if delta < self.delay:
|
if delta < self.delay:
|
||||||
time.sleep(delta)
|
time.sleep(self.delay - delta)
|
||||||
if isinstance(url, unicode):
|
if isinstance(url, unicode):
|
||||||
url = url.encode('utf-8')
|
url = url.encode('utf-8')
|
||||||
# Not sure is this is really needed as I think mechanize
|
# Not sure is this is really needed as I think mechanize
|
||||||
|
Loading…
x
Reference in New Issue
Block a user