From c53b6379597be5961b4e69e7f187608452874e4c Mon Sep 17 00:00:00 2001 From: Michael <michaelbrockus@gmail.com> Date: Sat, 18 Apr 2020 23:11:16 -0700 Subject: switch python2 %s for python3 .format --- mesonbuild/environment.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mesonbuild/environment.py') diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index c571141..64efda6 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -1360,7 +1360,7 @@ class Environment: try: p, out, err = Popen_safe(exelist + ['-version']) except OSError: - raise EnvironmentException('Could not execute Java compiler "%s"' % ' '.join(exelist)) + raise EnvironmentException('Could not execute Java compiler "{}"'.format(' '.join(exelist))) if 'javac' in out or 'javac' in err: version = search_version(err if 'javac' in err else out) if not version or version == 'unknown version': @@ -1408,7 +1408,7 @@ class Environment: try: p, out = Popen_safe(exelist + ['--version'])[0:2] except OSError: - raise EnvironmentException('Could not execute Vala compiler "%s"' % ' '.join(exelist)) + raise EnvironmentException('Could not execute Vala compiler "{}"'.format(' '.join(exelist))) version = search_version(out) if 'Vala' in out: comp_class = ValaCompiler @@ -1610,7 +1610,7 @@ class Environment: try: p, _, err = Popen_safe(exelist + ['-v']) except OSError: - raise EnvironmentException('Could not execute Swift compiler "%s"' % ' '.join(exelist)) + raise EnvironmentException('Could not execute Swift compiler "{}"'.format(' '.join(exelist))) version = search_version(err) if 'Swift' in err: # As for 5.0.1 swiftc *requires* a file to check the linker: @@ -1730,7 +1730,7 @@ class Environment: if p.returncode == 1 and err.startswith('ar: bad option: --'): # Solaris return ArLinker(linker) self._handle_exceptions(popen_exceptions, linkers, 'linker') - raise EnvironmentException('Unknown static linker "%s"' % ' '.join(linkers)) + raise EnvironmentException('Unknown static linker "{}"'.format(' '.join(linkers))) def get_source_dir(self): return self.source_dir -- cgit v1.1