summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Script/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py
index c59ce69..52d0db2 100644
--- a/src/engine/SCons/Script/__init__.py
+++ b/src/engine/SCons/Script/__init__.py
@@ -493,9 +493,11 @@ class OptParser(OptionParser):
help="Search up directory tree for SConstruct, "
"build all Default() targets.")
- def opt_debug(option, opt, value, parser):
- if value in ["count", "dtree", "includes", "memory", "objects",
- "pdb", "presub", "time", "tree"]:
+ debug_options = ["count", "dtree", "includes", "memory", "objects",
+ "pdb", "presub", "time", "tree"]
+
+ def opt_debug(option, opt, value, parser, debug_options=debug_options):
+ if value in debug_options:
setattr(parser.values, 'debug', value)
else:
raise OptionValueError("Warning: %s is not a valid debug type" % value)
@@ -503,7 +505,7 @@ class OptParser(OptionParser):
callback=opt_debug, nargs=1, dest="debug",
metavar="TYPE",
help="Print various types of debugging information: "
- "count, dtree, includes, memory, objects, pdb, time, tree.")
+ "%s." % string.join(debug_options, ", "))
self.add_option('-f', '--file', '--makefile', '--sconstruct',
action="append", nargs=1,