aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/help.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-14 23:15:58 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-14 23:15:58 -0500
commit1b9c628529848af370adbc67b5ba298236a1b86d (patch)
treedd16c447d971297637b59128c383c942a5578d1e /libbe/command/help.py
parent0786fc6693e40cdfaca7876b504acb3e5e7dc4d2 (diff)
downloadbugseverywhere-1b9c628529848af370adbc67b5ba298236a1b86d.tar.gz
Transitioned severity to Command-format, also added Command._get_*()
The old .requires_* thing was rediculous. The new ._get_*() callbacks allow the caller to provide a means for getting the expensive structures, which the command can use, or not, as required. This will also make it easier to implement the completion callbacks. The callbacks should probably have matching .set_*() methods, to avoid the current cache tweaking cmd._storage = ... etc. But that can wait for now...
Diffstat (limited to 'libbe/command/help.py')
-rw-r--r--libbe/command/help.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbe/command/help.py b/libbe/command/help.py
index c8d700d..6e55598 100644
--- a/libbe/command/help.py
+++ b/libbe/command/help.py
@@ -54,14 +54,15 @@ class Help (libbe.command.Command):
completion_callback=self.complete_topic)
])
- def _run(self, storage, bugdir, **params):
+ def _run(self, **params):
if params['topic'] == None:
if hasattr(self.ui, 'help'):
self.ui.help()
elif params['topic'] in libbe.command.commands():
module = libbe.command.get_command(params['topic'])
Class = libbe.command.get_command_class(module,params['topic'])
- c = Class()
+ c = Class(get_unconnected_storage=self.get_unconnected_storage,
+ ui=self.ui)
print >> self.stdout, c.help().rstrip('\n')
elif params['topic'] in TOPICS:
print >> self.stdout, TOPICS[params['topic']].rstrip('\n')