summaryrefslogtreecommitdiff
path: root/clcommands.py
diff options
context:
space:
mode:
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>2009-07-19 02:07:55 +0200
committerNicolas Chauvat <nicolas.chauvat@logilab.fr>2009-07-19 02:07:55 +0200
commita1cdde3320add8bbe4557639488bb4d2ef2861fd (patch)
treef579949c7a7fb9b4efb8a6ccdfcd35484854662b /clcommands.py
parent6bb5a230a8df5ed2fe417c7b85491073da50dfd3 (diff)
downloadlogilab-common-a1cdde3320add8bbe4557639488bb4d2ef2861fd.tar.gz
[cleanup] delete-trailing-whitespace
Diffstat (limited to 'clcommands.py')
-rw-r--r--clcommands.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/clcommands.py b/clcommands.py
index 8e30c0b..9f722b0 100644
--- a/clcommands.py
+++ b/clcommands.py
@@ -10,7 +10,7 @@ command'specific
"""
__docformat__ = "restructuredtext en"
-# XXX : merge with optparser ?
+# XXX : merge with optparser ?
import sys
from os.path import basename
@@ -55,7 +55,7 @@ class Command(Configuration):
raise BadCommandUsage('missing argument')
if self.max_args is not None and len(args) > self.max_args:
raise BadCommandUsage('too many arguments')
-
+
def run(self, args):
"""run the command with its specific arguments"""
raise NotImplementedError()
@@ -123,7 +123,7 @@ def cmd_run(cmdname, *args):
print 'ERROR: ', err
print command.help()
-
+
def main_run(args, doc=DEFAULT_DOC):
"""command line tool"""
try:
@@ -142,9 +142,9 @@ def main_run(args, doc=DEFAULT_DOC):
class ListCommandsCommand(Command):
"""list available commands, useful for bash completion."""
name = 'listcommands'
- arguments = '[command]'
+ arguments = '[command]'
hidden = True
-
+
def run(self, args):
"""run the command with its specific arguments"""
if args:
@@ -160,5 +160,5 @@ class ListCommandsCommand(Command):
cmd = _COMMANDS[command]
if not cmd.hidden:
print command
-
+
register_commands([ListCommandsCommand])