doing that auto default value for --time-sec only for --tor

This commit is contained in:
Miroslav Stampar 2011-04-19 08:43:29 +00:00
parent 4d48ac54dc
commit a7c26366b4

View File

@ -1205,13 +1205,13 @@ def __cleanupOptions():
# to distinguish explicit usage of --time-sec # to distinguish explicit usage of --time-sec
if conf.timeSec is None: if conf.timeSec is None:
if conf.tor or conf.proxy: if conf.tor:
conf.timeSec = 2 * TIME_DEFAULT_DELAY conf.timeSec = 2 * TIME_DEFAULT_DELAY
kb.adjustTimeDelay = False kb.adjustTimeDelay = False
warnMsg = "increasing default value for " warnMsg = "increasing default value for "
warnMsg += " --time-sec to %d because " % conf.timeSec warnMsg += " --time-sec to %d because " % conf.timeSec
warnMsg += "%s switch used" % ("--tor" if conf.tor else "--proxy") warnMsg += "--tor switch used"
logger.warn(warnMsg) logger.warn(warnMsg)
else: else:
conf.timeSec = TIME_DEFAULT_DELAY conf.timeSec = TIME_DEFAULT_DELAY