Fix for v3 in deleting empty proxies.
authorEric Hansen <ehansen@securityfor.us>
Wed, 12 Sep 2012 17:49:34 +0000 (13:49 -0400)
committerEric Hansen <ehansen@securityfor.us>
Wed, 12 Sep 2012 17:49:34 +0000 (13:49 -0400)
requests/models.py

index 0ef3025..af36410 100644 (file)
@@ -111,7 +111,7 @@ class Request(object):
         # Dictionary mapping protocol to the URL of the proxy (e.g. {'http': 'foo.bar:3128'})
         self.proxies = dict(proxies or [])
 
-        for proxy_type,uri_ref in self.proxies.items():
+        for proxy_type,uri_ref in list(self.proxies.items()):
             if not uri_ref:
                 del self.proxies[proxy_type]