Use f-strings in JavaCompiler

dirc2
Tristan Partin 3 years ago committed by Jussi Pakkanen
parent e87259f4a7
commit e05a88835a
  1. 4
      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 " \

Loading…
Cancel
Save