mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Merge pull request #6902 from radarhere/open
This commit is contained in:
		
						commit
						6d09f3382d
					
				| 
						 | 
				
			
			@ -3268,8 +3268,14 @@ def open(fp, mode="r", formats=None):
 | 
			
		|||
    im = _open_core(fp, filename, prefix, formats)
 | 
			
		||||
 | 
			
		||||
    if im is None and formats is ID:
 | 
			
		||||
        checked_formats = formats.copy()
 | 
			
		||||
        if init():
 | 
			
		||||
            im = _open_core(fp, filename, prefix, formats)
 | 
			
		||||
            im = _open_core(
 | 
			
		||||
                fp,
 | 
			
		||||
                filename,
 | 
			
		||||
                prefix,
 | 
			
		||||
                tuple(format for format in formats if format not in checked_formats),
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
    if im:
 | 
			
		||||
        im._exclusive_fp = exclusive_fp
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user