Minor fix of an argument typo as well as making an example more compacent with the wiki.
This commit is contained in:
parent
1d4f075ca7
commit
6bbdde763d
2 changed files with 4 additions and 7 deletions
|
|
@ -50,9 +50,6 @@ class EventBlinkButton(IntervalEvent):
|
||||||
for b in buttons:
|
for b in buttons:
|
||||||
try:
|
try:
|
||||||
b.scriptlink.blink()
|
b.scriptlink.blink()
|
||||||
except AttributeError:
|
|
||||||
#button has no blink() method. Just ignore.
|
|
||||||
pass
|
|
||||||
except:
|
except:
|
||||||
#show other tracebacks to log and owner of object.
|
#show other tracebacks to log and owner of object.
|
||||||
#This is important, we must handle these exceptions gracefully!
|
#This is important, we must handle these exceptions gracefully!
|
||||||
|
|
|
||||||
|
|
@ -229,21 +229,21 @@ class StateHelpIndex(object):
|
||||||
def has_state(self,state_name):
|
def has_state(self,state_name):
|
||||||
return self.help_index.has_key(state_name)
|
return self.help_index.has_key(state_name)
|
||||||
|
|
||||||
def add_state_help(self, state,command,text,staff_only=False):
|
def add_state_help(self, state,command,text,staff_help=False):
|
||||||
"""Store help for a command under a certain state.
|
"""Store help for a command under a certain state.
|
||||||
Supports <<TOPIC:MyTopic>> and <<TOPIC:STAFF:MyTopic>> markup."""
|
Supports <<TOPIC:MyTopic>> and <<TOPIC:STAFF:MyTopic>> markup."""
|
||||||
if self.help_index.has_key(state):
|
if self.help_index.has_key(state):
|
||||||
|
|
||||||
text = text.rstrip()
|
text = text.rstrip()
|
||||||
if self.identifier in text:
|
if self.identifier in text:
|
||||||
topic_dict, staff_dict = edit_help.handle_help_markup(command, text, staff_only,
|
topic_dict, staff_dict = edit_help.handle_help_markup(command, text, staff_help,
|
||||||
identifier=self.identifier)
|
identifier=self.identifier)
|
||||||
for topic, text in topic_dict.items():
|
for topic, text in topic_dict.items():
|
||||||
entry = edit_help.format_footer(topic,text,topic_dict,staff_dict)
|
entry = edit_help.format_footer(topic,text,topic_dict,staff_dict)
|
||||||
if entry:
|
if entry:
|
||||||
self.help_index[state][topic] = (staff_only, entry)
|
self.help_index[state][topic] = (staff_help, entry)
|
||||||
else:
|
else:
|
||||||
self.help_index[state][command] = (staff_only, text)
|
self.help_index[state][command] = (staff_help, text)
|
||||||
|
|
||||||
def del_state_help(self, state, topic):
|
def del_state_help(self, state, topic):
|
||||||
"""Manually delete a help topic from state help system. Note that this is
|
"""Manually delete a help topic from state help system. Note that this is
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue