chiark / gitweb /
service.py: Fix the RemoteService `_mkcmd' protocol.
[chopwood] / subcommand.py
index b2859155618f4628125a81be02420d4e09110b72..d6d850e5a4f371b54a4b53e29c5a8a1ece7ec6cc 100644 (file)
@@ -392,12 +392,10 @@ class SubcommandOptionParser (OP.OptionParser, object):
 ## 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):
-    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 --------------------------------------------------