diff options
author | Michael <michaelbrockus@gmail.com> | 2020-04-18 23:11:16 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-04-21 00:16:21 +0300 |
commit | c53b6379597be5961b4e69e7f187608452874e4c (patch) | |
tree | eade9c7e52c6940a236f595a728a638ad008f9cf /mesonbuild/envconfig.py | |
parent | 182f40d25add336531b4127e410af8bcbe067575 (diff) | |
download | meson-c53b6379597be5961b4e69e7f187608452874e4c.zip meson-c53b6379597be5961b4e69e7f187608452874e4c.tar.gz meson-c53b6379597be5961b4e69e7f187608452874e4c.tar.bz2 |
switch python2 %s for python3 .format
Diffstat (limited to 'mesonbuild/envconfig.py')
-rw-r--r-- | mesonbuild/envconfig.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 339f980..25b3c7f 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -93,15 +93,15 @@ class MesonConfigFile: # Windows paths... value = value.replace('\\', '\\\\') if ' ' in entry or '\t' in entry or "'" in entry or '"' in entry: - raise EnvironmentException('Malformed variable name %s in cross file..' % entry) + raise EnvironmentException('Malformed variable name {} in cross file..'.format(entry)) try: res = eval(value, {'__builtins__': None}, {'true': True, 'false': False}) except Exception: - raise EnvironmentException('Malformed value in cross file variable %s.' % entry) + raise EnvironmentException('Malformed value in cross file variable {}.'.format(entry)) for i in (res if isinstance(res, list) else [res]): if not isinstance(i, (str, int, bool)): - raise EnvironmentException('Malformed value in cross file variable %s.' % entry) + raise EnvironmentException('Malformed value in cross file variable {}.'.format(entry)) section[entry] = res @@ -224,11 +224,11 @@ class MachineInfo: cpu_family = literal['cpu_family'] if cpu_family not in known_cpu_families: - mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % cpu_family) + mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family)) endian = literal['endian'] if endian not in ('little', 'big'): - mlog.warning('Unknown endian %s' % endian) + mlog.warning('Unknown endian {}'.format(endian)) return cls(literal['system'], cpu_family, literal['cpu'], endian) |