mirror of https://gitlab.com/ita1024/waf.git
Simplifications
This commit is contained in:
parent
6873a1b4c6
commit
f78fbc32bb
|
@ -311,11 +311,7 @@ def conf(f):
|
|||
:type f: function
|
||||
"""
|
||||
def fun(*k, **kw):
|
||||
mandatory = True
|
||||
if 'mandatory' in kw:
|
||||
mandatory = kw['mandatory']
|
||||
del kw['mandatory']
|
||||
|
||||
mandatory = kw.pop('mandatory', True)
|
||||
try:
|
||||
return f(*k, **kw)
|
||||
except Errors.ConfigurationError:
|
||||
|
|
|
@ -409,17 +409,8 @@ class Context(ctx):
|
|||
kw['shell'] = isinstance(cmd, str)
|
||||
self.log_command(cmd, kw)
|
||||
|
||||
if 'quiet' in kw:
|
||||
quiet = kw['quiet']
|
||||
del kw['quiet']
|
||||
else:
|
||||
quiet = None
|
||||
|
||||
if 'output' in kw:
|
||||
to_ret = kw['output']
|
||||
del kw['output']
|
||||
else:
|
||||
to_ret = STDOUT
|
||||
quiet = kw.pop('quiet', None)
|
||||
to_ret = kw.pop('output', STDOUT)
|
||||
|
||||
if Logs.verbose and not kw['shell'] and not Utils.check_exe(cmd[0]):
|
||||
raise Errors.WafError('Program %r not found!' % cmd[0])
|
||||
|
|
Loading…
Reference in New Issue