mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	raise IOError in all cases when image can't be loaded
This commit is contained in:
		
							parent
							
								
									b8b3cdc146
								
							
						
					
					
						commit
						b078ad4599
					
				|  | @ -209,7 +209,7 @@ class ImageFile(Image.Image): | ||||||
|                         if LOAD_TRUNCATED_IMAGES: |                         if LOAD_TRUNCATED_IMAGES: | ||||||
|                             break |                             break | ||||||
|                         else: |                         else: | ||||||
|                             raise IndexError(ie) |                             raise IOError("image file is truncated") | ||||||
| 
 | 
 | ||||||
|                     if not s and not d.handles_eof:  # truncated jpeg |                     if not s and not d.handles_eof:  # truncated jpeg | ||||||
|                         self.tile = [] |                         self.tile = [] | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user