mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Merge pull request #3574 from jdufresne/base-exc
Catch BaseException for resource cleanup handlers
This commit is contained in:
		
						commit
						4d1a459fa7
					
				| 
						 | 
					@ -2663,7 +2663,7 @@ def open(fp, mode="r"):
 | 
				
			||||||
                # opening failures that are entirely expected.
 | 
					                # opening failures that are entirely expected.
 | 
				
			||||||
                # logger.debug("", exc_info=True)
 | 
					                # logger.debug("", exc_info=True)
 | 
				
			||||||
                continue
 | 
					                continue
 | 
				
			||||||
            except Exception:
 | 
					            except BaseException:
 | 
				
			||||||
                if exclusive_fp:
 | 
					                if exclusive_fp:
 | 
				
			||||||
                    fp.close()
 | 
					                    fp.close()
 | 
				
			||||||
                raise
 | 
					                raise
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user