# HG changeset patch # User Pascal Volk # Date 1346106905 0 # Node ID c79fdce4990854fff2e67c0eb30c716b94d32427 # Parent 607aa5c2acc4395c78060ec758f20cd215fa85ab VMM/cli/subcommands: Reverted accidentally committed help() code. diff -r 607aa5c2acc4 -r c79fdce49908 VirtualMailManager/cli/subcommands.py --- a/VirtualMailManager/cli/subcommands.py Mon Aug 27 22:24:11 2012 +0000 +++ b/VirtualMailManager/cli/subcommands.py Mon Aug 27 22:35:05 2012 +0000 @@ -16,7 +16,6 @@ from VirtualMailManager import ENCODING from VirtualMailManager.cli import get_winsize, prog, w_err, w_std -from VirtualMailManager.cli.clihelp import help_msgs from VirtualMailManager.common import human_size, size_in_bytes, \ version_str, format_domain_default from VirtualMailManager.constants import __copyright__, __date__, \ @@ -49,10 +48,6 @@ class Command(object): """Container class for command information.""" __slots__ = ('name', 'alias', 'func', 'args', 'descr') - FMT_HLP_USAGE = """ -usage: %(prog)s %(name)s %(args)s - %(prog)s %(alias)s %(args)s -""" def __init__(self, name, alias, func, args, descr): """Create a new Command instance. @@ -81,25 +76,6 @@ """the command's usage info.""" return u'%s %s %s' % (prog, self.name, self.args) - def help_(self): - old_ii = txt_wrpr.initial_indent - old_si = txt_wrpr.subsequent_indent - - txt_wrpr.subsequent_indent = (len(self.name) + 2) * ' ' - w_std(txt_wrpr.fill('%s: %s' % (self.name, self.descr))) - - info = Command.FMT_HLP_USAGE % dict(alias=self.alias, args=self.args, - name=self.name, prog=prog) - w_std(info) - - txt_wrpr.initial_indent = txt_wrpr.subsequent_indent = ' ' - try: - [w_std(txt_wrpr.fill(_(para)) + '\n') for para - in help_msgs[self.name]] - except KeyError: - w_err(1, "'help %s' not yet documented." % self.name, - 'see also: vmm(1)') - class RunContext(object): """Contains all information necessary to run a subcommand.""" @@ -467,8 +443,8 @@ else: usage(INVALID_ARGUMENT, _(u"Unknown help topic: '%s'") % ctx.args[2], ctx.scmd) - if topic != u'help': - return cmd_map[topic].help_() + # FIXME + w_err(1, "'help %s' not yet implemented." % topic, 'see also: vmm(1)') old_ii = txt_wrpr.initial_indent old_si = txt_wrpr.subsequent_indent