Permalink
Browse files

Resolved conflict, rearranged imports.

  • Loading branch information...
2 parents d393c49 + 9b762bf commit da51a324362069a5d557530a9d5d79a10826c94a @shazow committed Jul 18, 2011
Showing with 14 additions and 7 deletions.
  1. +14 −7 urllib3/connectionpool.py
View
@@ -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 @@ def urlopen(self, method, url, body=None, headers=None, retries=3,
raise TimeoutError("Request timed out after %f seconds" %
self.timeout)
- except (ssl.SSLError), e:
+ except (BaseSSLError), e:
# SSL certificate error
raise SSLError(e)

0 comments on commit da51a32

Please sign in to comment.