[PATCH 05/13] Remove WrappedIMAP4_SSL.read()

Ethan Glasser-Camp ethan at betacantrips.com
Sun Feb 6 16:58:59 UTC 2011


The imaplib2 version seems to work perfectly well.
---
 offlineimap/imaplibutil.py |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py
index 823f404..a36180b 100644
--- a/offlineimap/imaplibutil.py
+++ b/offlineimap/imaplibutil.py
@@ -187,20 +187,6 @@ class WrappedIMAP4_SSL(IMAP4_SSL):
             return retval
         return self.sslobj.read(min(n, 16384))
 
-    def read(self, n):
-        """Read exactly n bytes
-
-        As done in IMAP4_SSL.read() API. If read returns less than n
-        bytes, things break left and right."""
-        chunks = []
-        read = 0
-        while read < n:
-            data = self._read_upto (n-read)
-            read += len(data)
-            chunks.append(data)
-
-        return ''.join(chunks)
-
     def readline(self):
         """Get the next line. This implementation is more efficient
         than IMAP4_SSL.readline() which reads one char at a time and
-- 
1.7.1




More information about the OfflineIMAP-project mailing list