From 4e64c1126d6f8588a2bb4d92c9819f8fad25feca Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Wed, 11 Jul 2012 22:56:11 +0100 Subject: [PATCH] restored bold on questions to users (calls from readInput()) - issue #77 --- lib/core/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index c8c1db0a5..21672ea5a 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -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)