Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output an appropriate warning when a cross info file does not exist. #2021

Merged
merged 2 commits into from Jul 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion mesonbuild/environment.py
Expand Up @@ -907,7 +907,12 @@ def ok_type(self, i):

def parse_datafile(self, filename):
config = configparser.ConfigParser()
config.read(filename)
try:
f = open(filename, 'r')
config.read_file(f, filename)
f.close()
except FileNotFoundError:
raise EnvironmentException('File not found: %s.' % filename)
# This is a bit hackish at the moment.
for s in config.sections():
self.config[s] = {}
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/interpreterbase.py
Expand Up @@ -64,7 +64,7 @@ def __call__(self, f):
def wrapped(s, node, args, kwargs):
for k in kwargs:
if k not in self.permitted:
mlog.warning('Passed invalid keyword argument %s. This will become a hard error in the future.' % k)
mlog.warning('Passed invalid keyword argument "%s". This will become a hard error in the future.' % k)
return f(s, node, args, kwargs)
return wrapped

Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/modules/__init__.py
Expand Up @@ -15,7 +15,7 @@ def __call__(self, f):
def wrapped(s, interpreter, state, args, kwargs):
for k in kwargs:
if k not in self.permitted:
mlog.warning('Passed invalid keyword argument %s. This will become a hard error in the future.' % k)
mlog.warning('Passed invalid keyword argument "%s". This will become a hard error in the future.' % k)
return f(s, interpreter, state, args, kwargs)
return wrapped

Expand Down