diff options
author | Thomas Gerigk <tgerigk@gmx.de> | 2006-04-03 20:13:45 +0200 |
---|---|---|
committer | Thomas Gerigk <tgerigk@gmx.de> | 2006-04-03 20:13:45 +0200 |
commit | a5a63b3ae06f5cb0c24baa0d37af07ce7014f933 (patch) | |
tree | 8cbf4323454c0a6592e670d6d401d52b7715eed5 /becommands/set.py | |
parent | 755256e88d53ab478b8a6f54280bd2d6d01bca59 (diff) | |
download | bugseverywhere-a5a63b3ae06f5cb0c24baa0d37af07ce7014f933.tar.gz |
changed set.py to parsing.
Diffstat (limited to 'becommands/set.py')
-rw-r--r-- | becommands/set.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/becommands/set.py b/becommands/set.py index 2a977ca..18a6024 100644 --- a/becommands/set.py +++ b/becommands/set.py @@ -32,6 +32,7 @@ def execute(args): None >>> tests.clean_up() """ + options, args = get_parser().parse_args(args) if len(args) > 2: raise cmdutil.UserError("Too many arguments.") tree = cmdutil.bug_tree() @@ -49,9 +50,11 @@ def execute(args): del tree.settings[args[0]] tree.save_settings() -def help(): - return """be set [name] [value] +def get_parser(): + parser = cmdutil.CmdOptionParser("be set [name] [value]") + return parser +longhelp=""" Show or change per-tree settings. If name and value are supplied, the name is set to a new value. @@ -66,3 +69,7 @@ target To unset a setting, set it to "none". """ + +def help(): + return get_parser().help_str() + longhelp + |