From c3eb82e60bc596609dbb8833ea321c8cc589d5b9 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 8 Feb 2011 10:08:48 +0000 Subject: [PATCH] Proper fix --- lib/core/common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index e78ddc88f..0d79dff7b 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -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"