mirror of https://gitlab.com/ita1024/waf.git
api fix - Issue 1410
This commit is contained in:
parent
e241496f3e
commit
40673e8860
|
@ -465,7 +465,7 @@ class Context(ctx):
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
|
||||||
|
|
||||||
def msg(self, msg, result, color=None, **kw):
|
def msg(self, *k, **kw):
|
||||||
"""
|
"""
|
||||||
Print a configuration message of the form ``msg: result``.
|
Print a configuration message of the form ``msg: result``.
|
||||||
The second part of the message will be in colors. The output
|
The second part of the message will be in colors. The output
|
||||||
|
@ -483,8 +483,19 @@ class Context(ctx):
|
||||||
:param color: color to use, see :py:const:`waflib.Logs.colors_lst`
|
:param color: color to use, see :py:const:`waflib.Logs.colors_lst`
|
||||||
:type color: string
|
:type color: string
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
|
msg = kw['msg']
|
||||||
|
except KeyError:
|
||||||
|
msg = k[0]
|
||||||
|
|
||||||
self.start_msg(msg, **kw)
|
self.start_msg(msg, **kw)
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = kw['result']
|
||||||
|
except KeyError:
|
||||||
|
result = k[1]
|
||||||
|
|
||||||
|
color = kw.get('color', None)
|
||||||
if not isinstance(color, str):
|
if not isinstance(color, str):
|
||||||
color = result and 'GREEN' or 'YELLOW'
|
color = result and 'GREEN' or 'YELLOW'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue