From df4ede7229149f9822410c5e0c4860accc79e321 Mon Sep 17 00:00:00 2001 From: Griatch Date: Thu, 15 Oct 2009 11:09:40 +0000 Subject: [PATCH] Added fix to statetable that has it not add a state-help entry if there is no __doc__ string. This is useful if one overwrites a global command but wants to retain its original help entry. /Griatch --- src/statetable.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/statetable.py b/src/statetable.py index cbd684634..87d288c3e 100644 --- a/src/statetable.py +++ b/src/statetable.py @@ -270,6 +270,13 @@ class StateHelpIndex(object): if not self.help_index.has_key(state): return + if not help_text: + # if there is no doc-string, we don't + # create any help entry. This can be useful + # when overwriting global commands but want + # to retain their doc-strings. + return + # produce nicely formatted help entries, taking markup # into account. topics = helpsystem.edithelp.format_help_entry(topicstr,