Rework Plugin.commands() to include _setup_commands().
[hooke.git] / hooke / plugin / debug.py
index a786af07d1190b3b765ce23d4648af82961fb3a5..cc9101de77081d1978860c9ef56e444675106095 100644 (file)
@@ -32,9 +32,8 @@ from ..plugin import Builtin
 class DebugPlugin (Builtin):
     def __init__(self):
         super(DebugPlugin, self).__init__(name='debug')
-
-    def commands(self):
-        return [VersionCommand(), DebugCommand()]
+        self._commands = [VersionCommand(), DebugCommand()]
+        self._setup_commands()
 
 
 class VersionCommand (Command):