[PATCH 2/5] remove unused 'mustquote' regex

Sebastian Spaeth Sebastian at SSpaeth.de
Sun Aug 14 09:42:18 BST 2011


We set an imapobj.mustquote which apparently was used in previous
incarnations of imaplib or imaplib2, however, nothing in our codebase
makes use of that. So let us remove it.

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

diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py
index 6492086..c56b634 100644
--- a/offlineimap/imaplibutil.py
+++ b/offlineimap/imaplibutil.py
@@ -284,8 +284,6 @@ class WrappedIMAP4(UsefulIMAPMixIn, IMAP4):
         # imaplib2 uses this to poll()
         self.read_fd = self.sock.fileno()
 
-mustquote = re.compile(r"[^\w!#$%&'+,.:;<=>?^`|~-]")
-
 def Internaldate2epoch(resp):
     """Convert IMAP4 INTERNALDATE to UT.
 
diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py
index 6566ad5..28511bb 100644
--- a/offlineimap/imapserver.py
+++ b/offlineimap/imapserver.py
@@ -212,8 +212,6 @@ class IMAPServer:
                     imapobj = imaplibutil.WrappedIMAP4(self.hostname, self.port,
                                                        timeout=socket.getdefaulttimeout())
 
-                imapobj.mustquote = imaplibutil.mustquote
-
                 if not self.tunnel:
                     try:
                         # Try GSSAPI and continue if it fails
-- 
1.7.4.1





More information about the OfflineIMAP-project mailing list