Skip message for unknown variables when there is nothing to do

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/115>
Fixes: 870ed653b5 ("Warn about unknown scons variables")
This commit is contained in:
Kp 2015-08-11 03:05:55 +00:00
parent fa9f2e626d
commit 41ecab004f

View file

@ -2488,7 +2488,8 @@ h = 'DXX-Rebirth, SConstruct file help:' + """
"""
substenv = SCons.Environment.SubstitutionEnvironment()
variables.Update(substenv)
for d in d1x + d2x:
dxx = d1x + d2x
for d in dxx:
d.init(substenv)
h += d.PROGRAM_NAME + ('.%d:\n' % d.program_instance) + d.GenerateHelpText()
Help(h)
@ -2499,7 +2500,7 @@ unknown.pop('d2x', None)
unknown.pop('dxx', None)
unknown.pop('site', None)
ignore_unknown_variables = unknown.pop('ignore_unknown_variables', '0')
if unknown:
if dxx and unknown:
try:
ignore_unknown_variables = int(ignore_unknown_variables)
except ValueError: