Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

py3: port dictionary itervalues call

Daniel Graña666ebfa1d972
diff --git a/scrapy/core/downloader/__init__.py b/scrapy/core/downloader/__init__.py
index 965471851..8beb08159 100644
--- a/scrapy/core/downloader/__init__.py
+++ b/scrapy/core/downloader/__init__.py
@@ -5,6 +5,7 @@ from time import time
from datetime import datetime
from collections import deque
+import six
from twisted.internet import reactor, defer, task
from scrapy.utils.defer import mustbe_deferred
@@ -188,7 +189,7 @@ class Downloader(object):
def close(self):
self._slot_gc_loop.stop()
- for slot in self.slots.itervalues():
+ for slot in six.itervalues(self.slots):
slot.close()
def _slot_gc(self, age=60):