Couple of patches

This commit is contained in:
Miroslav Stampar
2020-01-08 10:37:59 +01:00
parent 239e4d7927
commit c95c370254
5 changed files with 13 additions and 5 deletions

View File

@@ -1080,7 +1080,7 @@ def readInput(message, default=None, checkBatch=True, boolean=False):
logger.debug(debugMsg)
if retVal is None:
if checkBatch and conf.get("batch") or conf.get("api"):
if checkBatch and conf.get("batch") or any(conf.get(_) for _ in ("api", "nonInteractive")):
if isListLike(default):
options = ','.join(getUnicode(opt, UNICODE_ENCODING) for opt in default)
elif default: