This commit is contained in:
Andrew Resch 2009-04-24 22:53:02 +00:00
parent c02a647427
commit 4878743d68

View File

@ -31,25 +31,16 @@ class Command(BaseCommand):
usage = "Usage: help [command]"
# def __init__(self):
# BaseCommand.__init__(self)
# get a list of commands, exclude 'help' so we won't run into a recursive loop.
#self._commands = load_commands(os.path.join(UI_PATH,'commands'), None, exclude=['help'])
# self._commands['help'] = self
def handle(self, *args, **options):
self.console = component.get("ConsoleUI")
self._commands = self.console._commands
if args:
if len(args) > 1:
#print usage
self.console.write(usage)
return
try:
cmd = self._commands[args[0]]
except KeyError:
#print templates.ERROR('unknown command %r' % args[0])
self.console.write("{{error}}Unknown command %r" % args[0])
return
try: