[PATCHv3 2/3] IMAP4.sslobj -> sock

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Sep 12 08:50:42 BST 2011


imaplib2 has changed internally to use self.sock for its ssl socket when
it used to be sslobj. Reflect that change.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/imaplibutil.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py
index ca556f0..609fd4d 100644
--- a/offlineimap/imaplibutil.py
+++ b/offlineimap/imaplibutil.py
@@ -149,7 +149,7 @@ class WrappedIMAP4_SSL(UsefulIMAPMixIn, IMAP4_SSL):
         super(WrappedIMAP4_SSL, self).open(host, port)
         if self._fingerprint or not self.ca_certs:
             # compare fingerprints
-            fingerprint = sha1(self.sslobj.getpeercert(True)).hexdigest()
+            fingerprint = sha1(self.sock.getpeercert(True)).hexdigest()
             if fingerprint != self._fingerprint:
                 raise OfflineImapError("Server SSL fingerprint '%s' for hostnam"
                       "e '%s' does not match configured fingerprint. Please ver"
-- 
1.7.4.1





More information about the OfflineIMAP-project mailing list