Now testing against Python 3.2
diff --git a/Makefile b/Makefile
index 015e511..e021d65 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@
-cd python2 && python2.5 httplib2test.py
-cd python2 && python2.6 httplib2test.py
-cd python3 && python3.1 httplib2test.py
+ -cd python3 && python3.2 httplib2test.py
VERSION = $(shell python setup.py --version)
DST = dist/httplib2-$(VERSION)
diff --git a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py
index 1599e68..ae786c1 100644
--- a/python3/httplib2/__init__.py
+++ b/python3/httplib2/__init__.py
@@ -1046,7 +1046,7 @@
if len(domain_port) == 2 and domain_port[1] == '443' and scheme == 'http':
scheme = 'https'
authority = domain_port[0]
-
+
conn_key = scheme+":"+authority
if conn_key in self.connections:
conn = self.connections[conn_key]
diff --git a/python3/httplib2test.py b/python3/httplib2test.py
index 61a297a..4ef3a78 100755
--- a/python3/httplib2test.py
+++ b/python3/httplib2test.py
@@ -456,18 +456,22 @@
http.add_certificate("akeyfile", "acertfile", "bitworking.org")
try:
- (response, content) = http.request("https://bitworking.org", "GET")
- except:
- pass
- self.assertEqual(http.connections["https:bitworking.org"].key_file, "akeyfile")
- self.assertEqual(http.connections["https:bitworking.org"].cert_file, "acertfile")
+ (response, content) = http.request("https://bitworking.org", "GET")
+ except AttributeError:
+ self.assertEqual(http.connections["https:bitworking.org"].key_file, "akeyfile")
+ self.assertEqual(http.connections["https:bitworking.org"].cert_file, "acertfile")
+ except IOError:
+ # Skip on 3.2
+ pass
try:
(response, content) = http.request("https://notthere.bitworking.org", "GET")
- except:
- pass
- self.assertEqual(http.connections["https:notthere.bitworking.org"].key_file, None)
- self.assertEqual(http.connections["https:notthere.bitworking.org"].cert_file, None)
+ except httplib2.ServerNotFoundError:
+ self.assertEqual(http.connections["https:notthere.bitworking.org"].key_file, None)
+ self.assertEqual(http.connections["https:notthere.bitworking.org"].cert_file, None)
+ except IOError:
+ # Skip on 3.2
+ pass