restored bold on questions to users (calls from readInput()) - issue #77

This commit is contained in:
Bernardo Damele 2012-07-11 22:56:11 +01:00
parent 247f95e051
commit 4e64c1126d

View File

@ -702,8 +702,11 @@ def setColor(message, bold=False):
if level:
kb.currentMessage = level
if hasattr(LOGGER_HANDLER, "level_map") and hasattr(kb, "currentMessage") and kb.currentMessage:
if bold:
retVal = colored(message, color=None, on_color=None, attrs=("bold",))
elif hasattr(LOGGER_HANDLER, "level_map") and hasattr(kb, "currentMessage") and kb.currentMessage:
_ = LOGGER_HANDLER.level_map.get(logging.getLevelName(kb.currentMessage))
if _:
background, foreground, bold = _
retVal = colored(message, color=foreground, on_color="on_%s" % background if background else None, attrs=("bold",) if bold else None)