Proper fix

This commit is contained in:
Bernardo Damele 2011-02-08 10:08:48 +00:00
parent dba2f74588
commit c3eb82e60b

View File

@ -673,7 +673,12 @@ def readInput(message, default=None):
message += " "
if conf.batch and default:
infoMsg = "%s%s" % (message, getUnicode(default, UNICODE_ENCODING))
if isinstance(default, (list, tuple, set)):
options = ",".join([getUnicode(opt, UNICODE_ENCODING) for opt in default])
else:
options = getUnicode(default, UNICODE_ENCODING)
infoMsg = "%s%s" % (message, options)
logger.info(infoMsg)
debugMsg = "used the default behaviour, running in batch mode"