Bug fix - KeyError on subproject without default options

pull/1368/head
Dima Krasner 8 years ago
parent 4dae59dfea
commit 65029f4114
  1. 5
      mesonbuild/interpreter.py

@ -1576,9 +1576,10 @@ class Interpreter(InterpreterBase):
@stringArgs @stringArgs
def func_project(self, node, args, kwargs): def func_project(self, node, args, kwargs):
if self.environment.first_invocation and ('default_options' in kwargs or default_options = kwargs.get('default_options', [])
if self.environment.first_invocation and (len(default_options) > 0 or
len(self.default_project_options) > 0): len(self.default_project_options) > 0):
self.parse_default_options(kwargs['default_options']) self.parse_default_options(default_options)
if not self.is_subproject(): if not self.is_subproject():
self.build.project_name = args[0] self.build.project_name = args[0]
if os.path.exists(self.option_file): if os.path.exists(self.option_file):

Loading…
Cancel
Save