[PATCH] folder.IMAP: Don't import copy

Sebastian Spaeth Sebastian at SSpaeth.de
Tue Sep 6 12:27:48 BST 2011


It is not needed. list(ALIST) will create a new copy of the list just
fine.

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

diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py
index dec14ae..d205d9b 100644
--- a/offlineimap/folder/IMAP.py
+++ b/offlineimap/folder/IMAP.py
@@ -21,7 +21,6 @@ import random
 import binascii
 import re
 import time
-from copy import copy
 from Base import BaseFolder
 from offlineimap import imaputil, imaplibutil, OfflineImapError
 try: # python 2.6 has set() built in
@@ -648,7 +647,7 @@ class IMAPFolder(BaseFolder):
         # Some IMAP servers do not always return a result.  Therefore,
         # only update the ones that it talks about, and manually fix
         # the others.
-        needupdate = copy(uidlist)
+        needupdate = list(uidlist)
         for result in r:
             if result == None:
                 # Compensate for servers that don't return anything from
-- 
1.7.4.1





More information about the OfflineIMAP-project mailing list