def getCommandObject(section, command): cmds = commands.load(section, command) if not cmds: return if not cmds.has_key(section): raise InvalidParameterException("No such section: %s" % section) if not cmds[section].has_key(command): raise InvalidParameterException("No such command: %s in section: %s" % (command, section)) obj = cmds[section][command] obj.init(amqp.Connection()) return obj
def getCommandObject(section, command): cmds = commands.load(section, command) if not cmds: return if not cmds.has_key(section): raise InvalidParameterException('No such section: %s' % section) if not cmds[section].has_key(command): raise InvalidParameterException('No such command: %s in section: %s' % (command, section)) obj = cmds[section][command] obj.init(amqp.Connection()) return obj
def getCommandHelp(section, command): dic = commands.load(section, command) obj = dic[section][command] fun = getattr(obj, "main") descr = introspect.describeMethod(fun) return descr
def getCommandHelp(section, command): dic = commands.load(section, command) obj = dic[section][command] fun = getattr(obj, 'main') descr = introspect.describeMethod(fun) return descr