mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Bug 1277: make Maildir use the user-provided factory instead of hard-wiring MaildirMessage.
2.5.2 bugfix candidate.
This commit is contained in:
		
							parent
							
								
									c6fde7293e
								
							
						
					
					
						commit
						15ce880cc8
					
				
					 2 changed files with 18 additions and 1 deletions
				
			
		|  | @ -315,7 +315,10 @@ def get_message(self, key): | |||
|         subpath = self._lookup(key) | ||||
|         f = open(os.path.join(self._path, subpath), 'r') | ||||
|         try: | ||||
|             msg = MaildirMessage(f) | ||||
|             if self._factory: | ||||
|                 msg = self._factory(f) | ||||
|             else: | ||||
|                 msg = MaildirMessage(f) | ||||
|         finally: | ||||
|             f.close() | ||||
|         subdir, name = os.path.split(subpath) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew M. Kuchling
						Andrew M. Kuchling