diff options
author | brian.quinlan <devnull@localhost> | 2009-05-20 18:32:26 +0000 |
---|---|---|
committer | brian.quinlan <devnull@localhost> | 2009-05-20 18:32:26 +0000 |
commit | e63029bf8fa0b37f42add3d6914509dd79c81cb6 (patch) | |
tree | 4d94a7c749c4590038d02ff2fd661aff10793da3 /crawl.py | |
parent | 7d3328c003c816a11c466b7bea077687b38d2c8c (diff) | |
download | futures-e63029bf8fa0b37f42add3d6914509dd79c81cb6.tar.gz |
Better tests and stuff
Diffstat (limited to 'crawl.py')
-rw-r--r-- | crawl.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -31,7 +31,8 @@ def download_urls_with_executor(urls, executor, timeout=60): fs = executor.run_to_futures( (functools.partial(load_url, url, timeout) for url in urls), timeout=timeout) - for url, future in zip(urls, fs.successful_futures()): + for future in fs.successful_futures(): + url = urls[future.index] url_to_content[url] = future.result() return url_to_content finally: |