summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranatoly techtonik <techtonik@gmail.com>2012-11-22 15:26:24 (GMT)
committeranatoly techtonik <techtonik@gmail.com>2012-11-22 15:26:24 (GMT)
commit6ab0a95225870da7efba3cff64133234e9973048 (patch)
tree53841732d3034cff88bfa52274453b62db475b5c
parent820af04df5e741db15f7429f1513b7e82d2b12b4 (diff)
downloadSCons-6ab0a95225870da7efba3cff64133234e9973048.zip
SCons-6ab0a95225870da7efba3cff64133234e9973048.tar.gz
SCons-6ab0a95225870da7efba3cff64133234e9973048.tar.bz2
Hide deprecated --debug={dtree,stree,tree} from --help output
-rw-r--r--src/CHANGES.txt1
-rw-r--r--src/engine/SCons/Script/SConsOptions.py21
2 files changed, 12 insertions, 10 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 8905e72..5c8f821 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -8,6 +8,7 @@ RELEASE 2.X.X -
From Anatoly Techtonik:
- Added ability to run scripts/scons.py directly from source checkout
+ - Hide deprecated --debug={dtree,stree,tree} from --help output
From Juan Lang:
- Fix WiX Tool to use .wixobj rather than .wxiobj for compiler output
diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py
index 3066c65..6f5293d 100644
--- a/src/engine/SCons/Script/SConsOptions.py
+++ b/src/engine/SCons/Script/SConsOptions.py
@@ -599,22 +599,23 @@ def Parser(version):
debug_options = ["count", "duplicate", "explain", "findlibs",
"includes", "memoizer", "memory", "objects",
"pdb", "prepare", "presub", "stacktrace",
- "time"] + list(deprecated_debug_options.keys())
+ "time"]
def opt_debug(option, opt, value, parser,
debug_options=debug_options,
deprecated_debug_options=deprecated_debug_options):
if value in debug_options:
parser.values.debug.append(value)
- if value in deprecated_debug_options.keys():
- try:
- parser.values.delayed_warnings
- except AttributeError:
- parser.values.delayed_warnings = []
- msg = deprecated_debug_options[value]
- w = "The --debug=%s option is deprecated%s." % (value, msg)
- t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w)
- parser.values.delayed_warnings.append(t)
+ elif value in deprecated_debug_options.keys():
+ parser.values.debug.append(value)
+ try:
+ parser.values.delayed_warnings
+ except AttributeError:
+ parser.values.delayed_warnings = []
+ msg = deprecated_debug_options[value]
+ w = "The --debug=%s option is deprecated%s." % (value, msg)
+ t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w)
+ parser.values.delayed_warnings.append(t)
else:
raise OptionValueError("Warning: %s is not a valid debug type" % value)
opt_debug_help = "Print various types of debugging information: %s." \