diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-03 20:31:39 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-04 17:01:03 -0400 |
commit | 800c3462f0ce35502232aedb3a318c5579c7a504 (patch) | |
tree | af17102fe3bfdabbe14cf8b47df051d8e0fffa76 /mesonbuild/programs.py | |
parent | d06cc042eb21bc16a4a5cc957a3615e5e3a9743a (diff) | |
download | meson-800c3462f0ce35502232aedb3a318c5579c7a504.zip meson-800c3462f0ce35502232aedb3a318c5579c7a504.tar.gz meson-800c3462f0ce35502232aedb3a318c5579c7a504.tar.bz2 |
condense lines
Diffstat (limited to 'mesonbuild/programs.py')
-rw-r--r-- | mesonbuild/programs.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py index 79f8300..25a0642 100644 --- a/mesonbuild/programs.py +++ b/mesonbuild/programs.py @@ -106,15 +106,13 @@ class ExternalProgram(mesonlib.HoldableObject): cmd: T.List[T.Union[str, ExternalProgram]] = [self, '--version'] res = interpreter.run_command_impl(interpreter.current_node, cmd, {}, True) if res.returncode != 0: - m = f'Running {raw_cmd!r} failed' - raise mesonlib.MesonException(m) + raise mesonlib.MesonException(f'Running {raw_cmd!r} failed') output = res.stdout.strip() if not output: output = res.stderr.strip() match = re.search(r'([0-9][0-9\.]+)', output) if not match: - m = f'Could not find a version number in output of {raw_cmd!r}' - raise mesonlib.MesonException(m) + raise mesonlib.MesonException(f'Could not find a version number in output of {raw_cmd!r}') self.cached_version = match.group(1) return self.cached_version |