m2crypto.patch-0.13 1.76 KB
Newer Older
1
Index: /usr/local/lib/python2.4/site-packages/M2Crypto/httpslib.py
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
===================================================================
--- httpslib.py	(revision 213)
+++ httpslib.py	(revision 272)
@@ -10,7 +10,7 @@
 
 if sys.version[0] == '2':
     
-    if sys.version[:3] != '2.0':
+    if sys.version_info[:2] > (2, 0):
         # In 2.1 and above, httplib exports "HTTP" only.
         from httplib import HTTPConnection, HTTPS_PORT
 
@@ -22,7 +22,7 @@
     
         default_port = HTTPS_PORT
     
-        if (sys.version[:3] == '2.2' and sys.version_info[2] > 1) or (sys.version[:3] == '2.3'):
+        if sys.version_info[:3] > (2, 2, 1):
         
             # 2.2.2 and above have the 'strict' param.
             def __init__(self, host, port=None, strict=None, **ssl):
@@ -98,7 +98,7 @@
         
         _connection_class = HTTPSConnection
     
-        if (sys.version[:3] == '2.2' and sys.version_info[2] > 1) or (sys.version[:3] == '2.3'):
+        if sys.version_info[:3] > (2, 2, 1):
             # 2.2.2 and above have the 'strict' param.            
             def __init__(self, host='', port=None, strict=None, **ssl):
                 HTTP.__init__(self, host, port, strict)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
Index: /usr/local/lib/python2.4/site-packages/M2Crypto/SSL/Context.py
===================================================================
--- Context.py	(revision 322)
+++ Context.py	(working copy)
@@ -14,13 +14,13 @@
         self.map = {}
 
     def __getitem__(self, key):
-        return self.map[key] 
+        return self.map[repr(key)] 
 
     def __setitem__(self, key, value):
-        self.map[key] = value
+        self.map[repr(key)] = value
 
     def __delitem__(self, key):
-        del self.map[key]
+        del self.map[repr(key)]
 
 def map():
     if _ctxmap.singleton is None: