mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Fix Issue9638 - remove dead code from py3k imaplib
This commit is contained in:
		
							parent
							
								
									e8d5145e18
								
							
						
					
					
						commit
						f241afaead
					
				
					 1 changed files with 0 additions and 15 deletions
				
			
		|  | @ -147,8 +147,6 @@ class error(Exception): pass    # Logical errors - debug required | |||
|     class abort(error): pass        # Service errors - close and retry | ||||
|     class readonly(abort): pass     # Mailbox status changed to READ-ONLY | ||||
| 
 | ||||
|     mustquote = re.compile(br"[^\w!#$%&'*+,.:;<=>?^`|~-]", re.ASCII) | ||||
| 
 | ||||
|     def __init__(self, host = '', port = IMAP4_PORT): | ||||
|         self.debug = Debug | ||||
|         self.state = 'LOGOUT' | ||||
|  | @ -846,7 +844,6 @@ def _command(self, name, *args): | |||
|             if arg is None: continue | ||||
|             if isinstance(arg, str): | ||||
|                 arg = bytes(arg, "ASCII") | ||||
|             #data = data + b' ' + self._checkquote(arg) | ||||
|             data = data + b' ' + arg | ||||
| 
 | ||||
|         literal = self.literal | ||||
|  | @ -1055,18 +1052,6 @@ def _new_tag(self): | |||
|         return tag | ||||
| 
 | ||||
| 
 | ||||
|     def _checkquote(self, arg): | ||||
| 
 | ||||
|         # Must quote command args if non-alphanumeric chars present, | ||||
|         # and not already quoted. | ||||
| 
 | ||||
|         if len(arg) >= 2 and (arg[0],arg[-1]) in (('(',')'),('"','"')): | ||||
|             return arg | ||||
|         if arg and self.mustquote.search(arg) is None: | ||||
|             return arg | ||||
|         return self._quote(arg) | ||||
| 
 | ||||
| 
 | ||||
|     def _quote(self, arg): | ||||
| 
 | ||||
|         arg = arg.replace(b'\\', b'\\\\') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Senthil Kumaran
						Senthil Kumaran