From e05a88835afad5c8eada06ab710c22e902730f7f Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Fri, 23 Sep 2022 14:28:27 -0500 Subject: [PATCH] Use f-strings in JavaCompiler --- mesonbuild/compilers/java.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/compilers/java.py b/mesonbuild/compilers/java.py index b58cd0e47..536780b27 100644 --- a/mesonbuild/compilers/java.py +++ b/mesonbuild/compilers/java.py @@ -93,14 +93,14 @@ class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler): pc = subprocess.Popen(self.exelist + [src], cwd=work_dir) pc.wait() if pc.returncode != 0: - raise EnvironmentException('Java compiler %s can not compile programs.' % self.name_string()) + raise EnvironmentException(f'Java compiler {self.name_string()} can not compile programs.') runner = shutil.which(self.javarunner) if runner: cmdlist = [runner, obj] pe = subprocess.Popen(cmdlist, cwd=work_dir) pe.wait() if pe.returncode != 0: - raise EnvironmentException('Executables created by Java compiler %s are not runnable.' % self.name_string()) + raise EnvironmentException(f'Executables created by Java compiler {self.name_string()} are not runnable.') else: m = "Java Virtual Machine wasn't found, but it's needed by Meson. " \ "Please install a JRE.\nIf you have specific needs where this " \