diff options
author | Andrey Petrov <andrey.petrov@shazow.net> | 2011-07-17 20:22:25 -0700 |
---|---|---|
committer | Andrey Petrov <andrey.petrov@shazow.net> | 2011-07-17 20:22:25 -0700 |
commit | da51a324362069a5d557530a9d5d79a10826c94a (patch) | |
tree | f3614f49466413c6121a6f177273526d401f5c02 | |
parent | d393c498da3037e772475288efa41087a9027ee8 (diff) | |
parent | 9b762bf784dd3ed7feac60f12fc8d9a32e3f55a2 (diff) | |
download | urllib3-0.4.1.tar.gz |
Resolved conflict, rearranged imports.0.4.1
-rw-r--r-- | urllib3/connectionpool.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py index 39b0bad0..552ccd98 100644 --- a/urllib3/connectionpool.py +++ b/urllib3/connectionpool.py @@ -1,21 +1,28 @@ import gzip +import zlib import logging import socket + + +from urllib import urlencode +from httplib import HTTPConnection, HTTPSConnection, HTTPException +from Queue import Queue, Empty, Full +from select import select +from socket import error as SocketError, timeout as SocketTimeout + + try: import ssl + BaseSSLError = ssl.SSLError except ImportError, e: ssl = None -import zlib + BaseSSLError = None try: from cStringIO import StringIO except ImportError, e: from StringIO import StringIO -from httplib import HTTPConnection, HTTPSConnection, HTTPException -from Queue import Queue, Empty, Full -from select import select -from socket import error as SocketError, timeout as SocketTimeout -from urllib import urlencode + from filepost import encode_multipart_formdata @@ -326,7 +333,7 @@ class HTTPConnectionPool(object): raise TimeoutError("Request timed out after %f seconds" % self.timeout) - except (ssl.SSLError), e: + except (BaseSSLError), e: # SSL certificate error raise SSLError(e) |