From f9413226b8aa6413bbc6a4d586be8d31b575089d Mon Sep 17 00:00:00 2001 From: Ethan Glasser-Camp Date: Tue, 8 Mar 2011 10:05:16 -0500 Subject: [PATCH] Import imaplib2 instead of imaplib imaplib2 has slightly different semantics than standard imaplib, so this patch will break the build, but I thought it was helpful to have it as a separate commit. Signed-off-by: Ethan Glasser-Camp Signed-off-by: Nicolas Sebrecht --- offlineimap/folder/IMAP.py | 1 - offlineimap/imaplibutil.py | 3 ++- offlineimap/imapserver.py | 2 +- offlineimap/init.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index 8cf57d4..8fd1b88 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -16,7 +16,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import imaplib import email import random import binascii diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py index b03e80b..46c207d 100644 --- a/offlineimap/imaplibutil.py +++ b/offlineimap/imaplibutil.py @@ -17,9 +17,10 @@ import re, socket, time, subprocess from offlineimap.ui import getglobalui +from offlineimap.imaplib2 import * # Import the symbols we need that aren't exported by default -from imaplib import IMAP4_PORT, IMAP4_SSL_PORT, InternalDate, Mon2num, IMAP4, IMAP4_SSL +from offlineimap.imaplib2 import IMAP4_PORT, IMAP4_SSL_PORT, InternalDate, Mon2num try: import ssl diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py index 7ead9a4..4e01a79 100644 --- a/offlineimap/imapserver.py +++ b/offlineimap/imapserver.py @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import imaplib +from offlineimap import imaplib2 as imaplib from offlineimap import imaplibutil, imaputil, threadutil from offlineimap.ui import getglobalui from threading import * diff --git a/offlineimap/init.py b/offlineimap/init.py index 7391727..96d4e50 100644 --- a/offlineimap/init.py +++ b/offlineimap/init.py @@ -19,7 +19,7 @@ import os import sys import threading -import imaplib +import offlineimap.imaplib2 as imaplib import signal import socket import logging