Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e64c11

Browse files
committed
restored bold on questions to users (calls from readInput()) - issue #77
1 parent 247f95e commit 4e64c11

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,11 @@ def setColor(message, bold=False):
702702
if level:
703703
kb.currentMessage = level
704704

705-
if hasattr(LOGGER_HANDLER, "level_map") and hasattr(kb, "currentMessage") and kb.currentMessage:
705+
if bold:
706+
retVal = colored(message, color=None, on_color=None, attrs=("bold",))
707+
elif hasattr(LOGGER_HANDLER, "level_map") and hasattr(kb, "currentMessage") and kb.currentMessage:
706708
_ = LOGGER_HANDLER.level_map.get(logging.getLevelName(kb.currentMessage))
709+
707710
if _:
708711
background, foreground, bold = _
709712
retVal = colored(message, color=foreground, on_color="on_%s" % background if background else None, attrs=("bold",) if bold else None)

0 commit comments

Comments
 (0)