diff options
| author | Eli Schwartz <eschwartz@archlinux.org> | 2021-07-08 00:06:10 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-04 16:29:32 -0400 |
| commit | d06cc042eb21bc16a4a5cc957a3615e5e3a9743a (patch) | |
| tree | 0907391e3581d707770584f3416a87c0cea18f77 /mesonbuild/programs.py | |
| parent | 47ae0b82f0483960fa7a3eabc68700b982688834 (diff) | |
| download | meson-d06cc042eb21bc16a4a5cc957a3615e5e3a9743a.tar.gz | |
f-strings
Diffstat (limited to 'mesonbuild/programs.py')
| -rw-r--r-- | mesonbuild/programs.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py index af27801f7..79f8300fd 100644 --- a/mesonbuild/programs.py +++ b/mesonbuild/programs.py @@ -106,15 +106,15 @@ 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 = 'Running {!r} failed' - raise mesonlib.MesonException(m.format(raw_cmd)) + m = f'Running {raw_cmd!r} failed' + raise mesonlib.MesonException(m) output = res.stdout.strip() if not output: output = res.stderr.strip() match = re.search(r'([0-9][0-9\.]+)', output) if not match: - m = 'Could not find a version number in output of {!r}' - raise mesonlib.MesonException(m.format(raw_cmd)) + m = f'Could not find a version number in output of {raw_cmd!r}' + raise mesonlib.MesonException(m) self.cached_version = match.group(1) return self.cached_version |
