Fix for an Issue #461

This commit is contained in:
Miroslav Stampar 2013-06-10 11:44:56 +02:00
parent ad07add549
commit 3583f45ee7

View File

@ -839,6 +839,8 @@ def readInput(message, default=None, checkBatch=True):
retVal = None retVal = None
kb.stickyLevel = None kb.stickyLevel = None
message = getUnicode(message)
if "\n" in message: if "\n" in message:
message += "%s> " % ("\n" if message.count("\n") > 1 else "") message += "%s> " % ("\n" if message.count("\n") > 1 else "")
elif message[-1] == ']': elif message[-1] == ']':
@ -855,7 +857,7 @@ def readInput(message, default=None, checkBatch=True):
if answer and question.lower() in message.lower(): if answer and question.lower() in message.lower():
retVal = getUnicode(answer, UNICODE_ENCODING) retVal = getUnicode(answer, UNICODE_ENCODING)
infoMsg = "%s%s" % (getUnicode(message), retVal) infoMsg = "%s%s" % (message, retVal)
logger.info(infoMsg) logger.info(infoMsg)
debugMsg = "used the given answer" debugMsg = "used the given answer"
@ -872,7 +874,7 @@ def readInput(message, default=None, checkBatch=True):
else: else:
options = unicode() options = unicode()
dataToStdout("\r%s%s\n" % (getUnicode(message), options), forceOutput=True, bold=True) dataToStdout("\r%s%s\n" % (message, options), forceOutput=True, bold=True)
debugMsg = "used the default behaviour, running in batch mode" debugMsg = "used the default behaviour, running in batch mode"
logger.debug(debugMsg) logger.debug(debugMsg)