aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-05-28 09:32:19 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-05-29 21:58:49 +0300
commita87496addd9160300837aa50193f4798c6f1d251 (patch)
tree189d8ec4f7328ade258118eae6066a892cda0750 /mesonbuild/compilers/compilers.py
parent64906b07557acf828806f1d1f7c67a2ca05cf103 (diff)
downloadmeson-a87496addd9160300837aa50193f4798c6f1d251.zip
meson-a87496addd9160300837aa50193f4798c6f1d251.tar.gz
meson-a87496addd9160300837aa50193f4798c6f1d251.tar.bz2
Don't raise StopIteration in generators, no longer allowed with Python 3.7. Fixes #3622
Raising StopIteration from a generator has been deprecated with Python 3.5 and is now an error with Python 3.7: https://docs.python.org/3.8/library/exceptions.html#StopIteration Just use return instead.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 762e7c5..56a0ab2 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -796,7 +796,7 @@ class Compiler:
mlog.debug('Cached compiler stdout:\n', p.stdo)
mlog.debug('Cached compiler stderr:\n', p.stde)
yield p
- raise StopIteration
+ return
try:
with tempfile.TemporaryDirectory() as tmpdirname:
if isinstance(code, str):