Use f-strings in JavaCompiler
This commit is contained in:
parent
e87259f4a7
commit
e05a88835a
|
@ -93,14 +93,14 @@ class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler):
|
||||||
pc = subprocess.Popen(self.exelist + [src], cwd=work_dir)
|
pc = subprocess.Popen(self.exelist + [src], cwd=work_dir)
|
||||||
pc.wait()
|
pc.wait()
|
||||||
if pc.returncode != 0:
|
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)
|
runner = shutil.which(self.javarunner)
|
||||||
if runner:
|
if runner:
|
||||||
cmdlist = [runner, obj]
|
cmdlist = [runner, obj]
|
||||||
pe = subprocess.Popen(cmdlist, cwd=work_dir)
|
pe = subprocess.Popen(cmdlist, cwd=work_dir)
|
||||||
pe.wait()
|
pe.wait()
|
||||||
if pe.returncode != 0:
|
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:
|
else:
|
||||||
m = "Java Virtual Machine wasn't found, but it's needed by Meson. " \
|
m = "Java Virtual Machine wasn't found, but it's needed by Meson. " \
|
||||||
"Please install a JRE.\nIf you have specific needs where this " \
|
"Please install a JRE.\nIf you have specific needs where this " \
|
||||||
|
|
Loading…
Reference in New Issue