diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-04-11 20:27:25 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-05-22 02:37:07 +0530 |
commit | f5af0f9b5ab4b35a46ef2a700d4815d2aa4b8096 (patch) | |
tree | 0a38755f2ac8df8c770037c6a4ec34a115a44d89 | |
parent | a00433fdbc382eeb53529685f5552c29d323bef3 (diff) | |
download | meson-f5af0f9b5ab4b35a46ef2a700d4815d2aa4b8096.zip meson-f5af0f9b5ab4b35a46ef2a700d4815d2aa4b8096.tar.gz meson-f5af0f9b5ab4b35a46ef2a700d4815d2aa4b8096.tar.bz2 |
configure_file: Don't use reserved keyword 'format'
Might lead to weird bugs
-rw-r--r-- | mesonbuild/interpreter.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 32a8019..25747c9 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3146,13 +3146,13 @@ root and issuing %s. raise InterpreterException('"capture" keyword requires "command" keyword.') if 'format' in kwargs: - format = kwargs['format'] - if not isinstance(format, str): + fmt = kwargs['format'] + if not isinstance(fmt, str): raise InterpreterException('"format" keyword must be a string.') else: - format = 'meson' + fmt = 'meson' - if format not in ('meson', 'cmake', 'cmake@'): + if fmt not in ('meson', 'cmake', 'cmake@'): raise InterpreterException('"format" possible values are "meson", "cmake" or "cmake@".') # Validate input @@ -3208,7 +3208,7 @@ root and issuing %s. if inputfile is not None: os.makedirs(os.path.join(self.environment.build_dir, self.subdir), exist_ok=True) missing_variables = mesonlib.do_conf_file(ifile_abs, ofile_abs, - conf.held_object, format) + conf.held_object, fmt) if missing_variables: var_list = ", ".join(map(repr, sorted(missing_variables))) mlog.warning( |