Fix Command._run signatures in hooke.command and hooke.ui.commandline.
authorW. Trevor King <wking@drexel.edu>
Fri, 30 Jul 2010 13:41:35 +0000 (09:41 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 30 Jul 2010 13:41:35 +0000 (09:41 -0400)
The commandline bits revert some changes from 6e29dc38540b where I'd
confused
  UserInterface.run(self, commands, ui_to_command_queue, command_to_ui_queue)
with
  Command._run(self, hooke, inqueue, outqueue, params)

hooke/command.py
hooke/ui/commandline.py

index cb5490928caa9a309d66404379b49db2cc403fce..e4bb9c16baa03f5cf2aa771c945c8f9c134976cb 100644 (file)
@@ -141,7 +141,7 @@ class Command (object):
         outqueue.put(e)
         return 0
 
-    def _run(self, inqueue, outqueue, params):
+    def _run(self, hooke, inqueue, outqueue, params):
         """This is where the command-specific magic will happen.
         """
         pass
index 005e039724eac468ba2b4f3c019df8fd29913f70..c5f3353b000d71a9e8dd8652dda0b6e09492efc1 100644 (file)
@@ -290,7 +290,7 @@ class LocalHelpCommand (Command):
                      help='The name of the command you want help with.')
             ]
 
-    def _run(self, commands, inqueue, outqueue, params):
+    def _run(self, hooke, inqueue, outqueue, params):
         raise NotImplementedError # cmd.Cmd already implements .do_help()
 
 class LocalExitCommand (Command):
@@ -307,7 +307,7 @@ typing mistakes ;).
 """.strip()),
                 ])
 
-    def _run(self, commands, inqueue, outqueue, params):
+    def _run(self, hooke, inqueue, outqueue, params):
         """The guts of the `do_exit/_quit/_EOF` commands.
 
         A `True` return stops :meth:`.cmdloop` execution.