default dirs update

This commit is contained in:
Miroslav Stampar 2010-02-25 14:51:39 +00:00
parent 8f47b1a524
commit 3721451cd6

View File

@ -274,9 +274,9 @@ def getDirs():
directories = set() directories = set()
if kb.os == "Windows": if kb.os == "Windows":
defaultDir = "C:/Inetpub/wwwroot/" defaultDirs = ["C:/Inetpub/wwwroot/", "C:/xampp/htdocs/"]
else: else:
defaultDir = "/var/www/" defaultDirs = ["/var/www/"]
if kb.absFilePaths: if kb.absFilePaths:
infoMsg = "retrieved web server full paths: " infoMsg = "retrieved web server full paths: "
@ -296,8 +296,8 @@ def getDirs():
logger.warn(warnMsg) logger.warn(warnMsg)
message = "please provide any additional web server full path to try " message = "please provide any additional web server full path to try "
message += "to upload the agent [%s]: " % defaultDir message += "to upload the agent [%s]: " % "".join("%s," % directory for directory in defaultDirs).rstrip(',')
inputDirs = readInput(message, default=defaultDir) inputDirs = readInput(message, default="".join("%s," % directory for directory in defaultDirs).rstrip(','))
if inputDirs: if inputDirs:
inputDirs = inputDirs.replace(", ", ",") inputDirs = inputDirs.replace(", ", ",")
@ -307,7 +307,7 @@ def getDirs():
if inputDir: if inputDir:
directories.add(inputDir) directories.add(inputDir)
else: else:
directories.add(defaultDir) [directories.add(directory) for directory in defaultDirs]
return directories return directories