When TemporaryDirectory() cleans up on __exit__ it sometimes throws OSError noting that the dir isn't empty. This happens after the first yield in this generator and leads to the exception being handled which leads to a second yield. contextlib.contextmanager() fails then since the function it wraps is only allowed to yield once. Fix this by not yielding again in the error case. Fixes #7947pull/7913/head
parent
3e6fbde94c
commit
5dd174c60b
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue