chiark
/
gitweb
/
~mdw
/
chopwood
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backend.py: Make FlatFileRecord._format include the trailing newline.
[chopwood]
/
subcommand.py
diff --git
a/subcommand.py
b/subcommand.py
index b2859155618f4628125a81be02420d4e09110b72..d6d850e5a4f371b54a4b53e29c5a8a1ece7ec6cc 100644
(file)
--- a/
subcommand.py
+++ b/
subcommand.py
@@
-392,12
+392,10
@@
class SubcommandOptionParser (OP.OptionParser, object):
## ready to roll.
COMMANDS = []
## ready to roll.
COMMANDS = []
-def subcommand(name, contexts, desc, cls = Subcommand,
- opts = [], params = [], oparams = [], rparam = None):
+def subcommand(name, contexts, desc, cls = Subcommand, *args, **kw):
"""Decorator for defining subcommands."""
def _(func):
"""Decorator for defining subcommands."""
def _(func):
- COMMANDS.append(cls(name, contexts, desc, func,
- opts, params, oparams, rparam))
+ COMMANDS.append(cls(name, contexts, desc, func, *args, **kw))
return _
###----- That's all, folks --------------------------------------------------
return _
###----- That's all, folks --------------------------------------------------