Use f-strings in JavaCompiler
@@ -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 " \
