diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2020-11-08 13:59:28 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2021-01-06 14:52:26 +0530 |
commit | 584daea0f3c43ff3a8be320fc533c698d714057b (patch) | |
tree | 0453da66ad65fda83d8bc86558f2f8e47e1c651f /docs/markdown/Python-module.md | |
parent | b17972d4bf8f3fff54b3bb9ada5b2c9e7ccbc35b (diff) | |
download | meson-584daea0f3c43ff3a8be320fc533c698d714057b.zip meson-584daea0f3c43ff3a8be320fc533c698d714057b.tar.gz meson-584daea0f3c43ff3a8be320fc533c698d714057b.tar.bz2 |
Fix "generator doesn't stop" on Windows
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 #7947
Diffstat (limited to 'docs/markdown/Python-module.md')
0 files changed, 0 insertions, 0 deletions