Don't require the string module
There is no need for using the string module if all we want is to split a string at the white space. All pythons since at least 2.4 can do that. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
		 Sebastian Spaeth
					Sebastian Spaeth
				
			
				
					committed by
					
						 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
			
				
	
			
			
			 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
						parent
						
							b768d2d28b
						
					
				
				
					commit
					6398bf7795
				
			| @@ -18,7 +18,6 @@ | |||||||
|  |  | ||||||
| import imaplib | import imaplib | ||||||
| import rfc822 | import rfc822 | ||||||
| import string |  | ||||||
| import random | import random | ||||||
| import binascii | import binascii | ||||||
| import re | import re | ||||||
| @@ -111,7 +110,7 @@ class IMAPFolder(BaseFolder): | |||||||
|             self.imapserver.releaseconnection(imapobj) |             self.imapserver.releaseconnection(imapobj) | ||||||
|  |  | ||||||
|         # Discard the message number. |         # Discard the message number. | ||||||
|         messagestr = string.split(response[0], maxsplit = 1)[1] |         messagestr = response[0].split(' ', 1)[1] | ||||||
|         options = imaputil.flags2hash(messagestr) |         options = imaputil.flags2hash(messagestr) | ||||||
|         if not options.has_key('UID'): |         if not options.has_key('UID'): | ||||||
|             return True |             return True | ||||||
| @@ -194,7 +193,7 @@ class IMAPFolder(BaseFolder): | |||||||
|             self.imapserver.releaseconnection(imapobj) |             self.imapserver.releaseconnection(imapobj) | ||||||
|         for messagestr in response: |         for messagestr in response: | ||||||
|             # Discard the message number. |             # Discard the message number. | ||||||
|             messagestr = string.split(messagestr, maxsplit = 1)[1] |             messagestr = messagestr.split(' ', 1)[1] | ||||||
|             options = imaputil.flags2hash(messagestr) |             options = imaputil.flags2hash(messagestr) | ||||||
|             if not options.has_key('UID'): |             if not options.has_key('UID'): | ||||||
|                 self.ui.warn('No UID in message with options %s' %\ |                 self.ui.warn('No UID in message with options %s' %\ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user