diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-09 15:46:13 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-15 12:51:25 +0000 |
commit | f37692bedb6c6a68fe1a1b91722fcb0b809e9fde (patch) | |
tree | faeeb4d8e0a22589bc7d9f19805f27266ec26ebe | |
parent | 56286fd2b84eb28605314ef7bd587394a9156b63 (diff) | |
download | meson-f37692bedb6c6a68fe1a1b91722fcb0b809e9fde.zip meson-f37692bedb6c6a68fe1a1b91722fcb0b809e9fde.tar.gz meson-f37692bedb6c6a68fe1a1b91722fcb0b809e9fde.tar.bz2 |
Fix exception in 'test cases/failing/55 wrong shared crate type' when rustc is missing
Fix exception handling of missing rustc, by making it look like the other
compiler detectors
Traceback (most recent call last):
File "/wip/meson/mesonbuild/environment.py", line 699, in detect_rust_compiler
p, out = Popen_safe(compiler + ['--version'])[0:2]
[...]
FileNotFoundError: [Errno 2] No such file or directory: 'rustc': 'rustc'
During handling of the above exception, another exception occurred:
[...]
File "/wip/meson/mesonbuild/environment.py", line 701, in detect_rust_compiler
popen_exceptions[compiler] = e
TypeError: unhashable type: 'list'
-rw-r--r-- | mesonbuild/environment.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 52c670a..e553423 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -695,10 +695,11 @@ class Environment: for compiler in compilers: if isinstance(compiler, str): compiler = [compiler] + arg = ['--version'] try: - p, out = Popen_safe(compiler + ['--version'])[0:2] + p, out = Popen_safe(compiler + arg)[0:2] except OSError as e: - popen_exceptions[compiler] = e + popen_exceptions[' '.join(compiler + arg)] = e continue version = search_version(out) |