mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Merge pull request #2215 from jdufresne/img-palette-close
Close file after reading in ImagePalette.load()
This commit is contained in:
		
						commit
						2a74940817
					
				| 
						 | 
				
			
			@ -197,7 +197,7 @@ def load(filename):
 | 
			
		|||
 | 
			
		||||
    # FIXME: supports GIMP gradients only
 | 
			
		||||
 | 
			
		||||
    fp = open(filename, "rb")
 | 
			
		||||
    with open(filename, "rb") as fp:
 | 
			
		||||
 | 
			
		||||
        for paletteHandler in [
 | 
			
		||||
            GimpPaletteFile.GimpPaletteFile,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user