From 7fbb29ab38dbebffb6b94d667233e255d097b882 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 30 Jul 2010 09:41:35 -0400 Subject: [PATCH] Fix Command._run signatures in hooke.command and hooke.ui.commandline. 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 | 2 +- hooke/ui/commandline.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hooke/command.py b/hooke/command.py index cb54909..e4bb9c1 100644 --- a/hooke/command.py +++ b/hooke/command.py @@ -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 diff --git a/hooke/ui/commandline.py b/hooke/ui/commandline.py index 005e039..c5f3353 100644 --- a/hooke/ui/commandline.py +++ b/hooke/ui/commandline.py @@ -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. -- 2.26.2