modifying redirection code for only two choices

This commit is contained in:
Miroslav Stampar
2012-03-18 17:27:08 +00:00
parent c03d0e24fb
commit 0fc4288a7c
5 changed files with 14 additions and 18 deletions

View File

@@ -720,7 +720,7 @@ def checkDynamicContent(firstPage, secondPage):
if count > conf.retries:
warnMsg = "target url is too dynamic. "
warnMsg += "switching to '--text-only' "
warnMsg += "Switching to '--text-only' "
logger.warn(warnMsg)
conf.textOnly = True
@@ -744,9 +744,6 @@ def checkStability():
like for instance string matching (--string).
"""
if kb.redirectChoice:
return None
infoMsg = "testing if the url is stable, wait a few seconds"
logger.info(infoMsg)
@@ -754,6 +751,9 @@ def checkStability():
time.sleep(1)
secondPage, _ = Request.queryPage(content=True, raise404=False)
if kb.redirectChoice:
return None
kb.pageStable = (firstPage == secondPage)
if kb.pageStable: