diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-12-28 10:14:30 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-30 18:02:28 +0200 |
commit | ae0f4ef055de22996808714d3c42017605a18b3a (patch) | |
tree | da371623071dc1ee1578c808536aea04d627e9fa /mesonbuild/environment.py | |
parent | 6f3e2a0a0753ad0a4fc84a74fdc6209f436d4371 (diff) | |
download | meson-ae0f4ef055de22996808714d3c42017605a18b3a.zip meson-ae0f4ef055de22996808714d3c42017605a18b3a.tar.gz meson-ae0f4ef055de22996808714d3c42017605a18b3a.tar.bz2 |
compilers: Fix error when objc/objc++ compilers are not found
Earlier it would exit with a traceback:
UnboundLocalError: local variable 'out' referenced before assignment
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 858d31d..0c9a2f3 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -608,6 +608,7 @@ class Environment: p, out, err = Popen_safe(compiler + arg) except OSError as e: popen_exceptions[' '.join(compiler + arg)] = e + continue version = search_version(out) if 'Free Software Foundation' in out: defines = self.get_gnu_compiler_defines(compiler) @@ -634,6 +635,7 @@ class Environment: p, out, err = Popen_safe(compiler + arg) except OSError as e: popen_exceptions[' '.join(compiler + arg)] = e + continue version = search_version(out) if 'Free Software Foundation' in out: defines = self.get_gnu_compiler_defines(compiler) |