Rework Plugin.commands() to include _setup_commands().
[hooke.git] / hooke / plugin / config.py
index ff76d8f66321215742b157da1b91811a22c4778d..7cb4ef5af8caf816621e09324ef2c6b6b3da4ac7 100644 (file)
@@ -31,9 +31,8 @@ from ..plugin import Builtin
 class ConfigPlugin (Builtin):
     def __init__(self):
         super(ConfigPlugin, self).__init__(name='config')
-
-    def commands(self):
-        return [GetCommand(), SetCommand(), PrintCommand()]
+        self._commands = [GetCommand(), SetCommand(), PrintCommand()]
+        self._setup_commands()
 
 
 # Define common or complicated arguments