On Thu, Jan 24, 2008 at 08:11:45PM -0500, James Antill wrote: > > 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.
Ahh, good point, as they mightn't subclass YumCommand. So maybe show one or the other (usage or summary) if provided, and if both are missing, then give a helpful error message? -James
pgpGNkWLGJaO3.pgp
Description: PGP signature
_______________________________________________ Yum-devel mailing list [email protected] https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
