Revision 74d988b0 snf-common/synnefo/lib/pool/http.py
b/snf-common/synnefo/lib/pool/http.py | ||
---|---|---|
35 | 35 |
from select import select |
36 | 36 |
|
37 | 37 |
from httplib import ( |
38 |
HTTPConnection as http_class,
|
|
39 |
HTTPSConnection as https_class,
|
|
40 |
ResponseNotReady
|
|
38 |
HTTPConnection as http_class,
|
|
39 |
HTTPSConnection as https_class, |
|
40 |
ResponseNotReady |
|
41 | 41 |
) |
42 | 42 |
|
43 | 43 |
from new import instancemethod |
... | ... | |
72 | 72 |
class HTTPConnectionPool(ObjectPool): |
73 | 73 |
|
74 | 74 |
_scheme_to_class = { |
75 |
'http': http_class,
|
|
76 |
'https': https_class,
|
|
75 |
'http': http_class, |
|
76 |
'https': https_class, |
|
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
def __init__(self, scheme, netloc, size=None): |
80 |
log.debug("INIT-POOL: Initializing pool of size %d, scheme: %s, " \
|
|
80 |
log.debug("INIT-POOL: Initializing pool of size %d, scheme: %s, " |
|
81 | 81 |
"netloc: %s", size, scheme, netloc) |
82 | 82 |
ObjectPool.__init__(self, size=size) |
83 | 83 |
|
Also available in: Unified diff