mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-17 05:47:50 +00:00
Clean up
This commit is contained in:
parent
c02a647427
commit
4878743d68
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user