diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-05-18 19:44:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 19:44:57 +0300 |
commit | 5ec6151e56140a19ef185052ffb02bd1ff957bd7 (patch) | |
tree | 53346478d8e84aefd170ac6226938ca89d6d0a77 /mesonbuild/environment.py | |
parent | a31bc4ede5883d449c15c90535b21bc8f9e28d6d (diff) | |
parent | 0e56ec2dbdbbd463d608c42e0aa117357e18936a (diff) | |
download | meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.zip meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.gz meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.bz2 |
Merge pull request #1810 from QuLogic/pycharm-warnings
Fix various warnings found in PyCharm
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 13bbe62..bf58472 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os, re, subprocess, platform -from . import coredata -from . import mesonlib -from . import mlog +import os +import platform +import re + from .compilers import * from .mesonlib import EnvironmentException, Popen_safe import configparser @@ -459,11 +459,11 @@ class Environment: for compiler in compilers: if isinstance(compiler, str): compiler = [compiler] + if 'cl' in compiler or 'cl.exe' in compiler: + arg = '/?' + else: + arg = '--version' try: - if 'cl' in compiler or 'cl.exe' in compiler: - arg = '/?' - else: - arg = '--version' p, out, err = Popen_safe(compiler + [arg]) except OSError as e: popen_exceptions[' '.join(compiler + [arg])] = e @@ -738,7 +738,7 @@ class Environment: if p.returncode == 1 and err.startswith('usage'): # OSX return ArLinker(linker) self._handle_exceptions(popen_exceptions, linkers, 'linker') - raise EnvironmentException('Unknown static linker "%s"' % ' '.join(linker)) + raise EnvironmentException('Unknown static linker "%s"' % ' '.join(linkers)) def detect_ccache(self): try: |