summaryrefslogtreecommitdiff
path: root/clcommands.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2011-05-09 11:21:37 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2011-05-09 11:21:37 +0200
commit22e8cfc0af0c9b77db169317d409877c9ac7d32b (patch)
treeb61f492471a9e283ae890b3dd8d91dd97d541224 /clcommands.py
parenta0a7928f9a37fb972ead10293e6bd3db0628397b (diff)
downloadlogilab-common-22e8cfc0af0c9b77db169317d409877c9ac7d32b.tar.gz
clcommands: make registration possible by class decoration
Diffstat (limited to 'clcommands.py')
-rw-r--r--clcommands.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/clcommands.py b/clcommands.py
index f230bbb..a0b4d90 100644
--- a/clcommands.py
+++ b/clcommands.py
@@ -94,6 +94,7 @@ class CommandLine(dict):
assert not self.check_duplicated_command or force or not cls.name in self, \
'a command %s is already defined' % cls.name
self[cls.name] = cls
+ return cls
def run(self, args):
"""main command line access point: