[Yum-devel] [PATCH] yum help and --help cleanup

James Antill james.antill at redhat.com
Fri Jan 25 01:11:45 UTC 2008


On Thu, 2008-01-24 at 19:32 -0500, James Bowes wrote:
> def doCommand(self, base, basecmd, extcmds):
> +        if base.yum_cli_commands.has_key(extcmds[0]):
> +            command = base.yum_cli_commands[extcmds[0]]
> +            canonical_name = command.getNames()[0]
> +            # XXX need detailed help here, too
> +            usagestr = "%s %s\n\n%s" % (canonical_name,
> command.getUsage(),
> +                    command.getSummary())
> +            base.verbose_logger.log(logginglevels.INFO_2, usagestr)

 It all looks awesome, but the above needs to take into account that
some plugins register commands and won't have the summary/usage methods.

-- 
James Antill <james.antill at redhat.com>
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20080124/7d0ceffa/attachment.pgp 


More information about the Yum-devel mailing list