From 36280b33fa7b075c097e53e7563fcc3bb1b20337 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 12 Aug 2011 13:06:40 +0000 Subject: [PATCH] Ask the user wheather or not to adjust the time delay - there have been a case where the forcing of conf.timeSec screwed the result in an extremely lagged and unreliable site --- lib/core/common.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 05dacff79..53f2e2ea8 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2098,11 +2098,12 @@ def adjustTimeDelay(lastQueryDuration, lowerStdLimit): if all([x == candidate for x in kb.delayCandidates]) and candidate < conf.timeSec: print - warnMsg = "adjusting time delay to %d second%s " % (candidate, 's' if candidate > 1 else '') - warnMsg += "(due to good response times)" - logger.warn(warnMsg) + msg = "do you want to adjust the time delay to %d second%s " % (candidate, 's' if candidate > 1 else '') + msg += "(due to good response times)? [Y/n] " + inp = readInput(msg, default="Y") - conf.timeSec = candidate + if inp and inp[0].lower() == "y": + conf.timeSec = candidate def extractErrorMessage(page): """