Implementation for an Issue #515

This commit is contained in:
Miroslav Stampar 2013-08-30 10:22:43 +02:00
parent e0bfb0503c
commit 9e975210ac

View File

@ -688,12 +688,22 @@ def getDocRoot():
for suffix in BRUTE_DOC_ROOT_SUFFIXES: for suffix in BRUTE_DOC_ROOT_SUFFIXES:
for target in targets: for target in targets:
item = "%s/%s" % (prefix, suffix) item = "%s/%s" % (prefix, suffix)
item = item.replace(BRUTE_DOC_ROOT_TARGET_MARK, target).replace("//", "/") item = item.replace(BRUTE_DOC_ROOT_TARGET_MARK, target).replace("//", '/').rstrip('/')
docRoot.append(item) docRoot.append(item)
if BRUTE_DOC_ROOT_TARGET_MARK not in prefix: if BRUTE_DOC_ROOT_TARGET_MARK not in prefix:
break break
infoMsg = "using common document root locations: %s" % ','.join(docRoot)
logger.info(infoMsg)
msg = "use additional custom "
msg += "document root locations [Enter for None]: "
answer = readInput(msg)
if answer:
docRoot.extend(answer.split(','))
else: else:
docRoot = defaultDocRoot docRoot = defaultDocRoot