From 3619fc51279c78e4794f375950e9af69d05acf19 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 6 Nov 2010 08:31:11 +0000 Subject: [PATCH] minor update --- lib/controller/checks.py | 1 - lib/core/common.py | 8 -------- lib/request/comparison.py | 5 ++--- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 7ee10918d..cc8d9033e 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -17,7 +17,6 @@ from lib.core.agent import agent from lib.core.common import beep from lib.core.common import getFilteredPageContent from lib.core.common import getUnicode -from lib.core.common import preparePageForLineComparison from lib.core.common import randomInt from lib.core.common import randomStr from lib.core.common import readInput diff --git a/lib/core/common.py b/lib/core/common.py index fb1ff7cfd..b89500fd5 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1093,14 +1093,6 @@ def sanitizeAsciiString(subject): else: return None -def preparePageForLineComparison(page): - retVal = page - - if isinstance(page, basestring): - return page.replace("><", ">\n<").replace("
", "\n").splitlines() - - return retVal - def getFilteredPageContent(page): retVal = page diff --git a/lib/request/comparison.py b/lib/request/comparison.py index b3d02d89d..18e93aa38 100644 --- a/lib/request/comparison.py +++ b/lib/request/comparison.py @@ -10,7 +10,6 @@ See the file 'doc/COPYING' for copying permission import re from lib.core.common import getFilteredPageContent -from lib.core.common import preparePageForLineComparison from lib.core.common import wasLastRequestError from lib.core.data import conf from lib.core.data import kb @@ -98,9 +97,9 @@ def comparison(page, headers=None, getSeqMatcher=False, pageLength=None): if getSeqMatcher: return ratio - # In case of an DBMS error page return False + # In case of an DBMS error page return None elif wasLastRequestError(): - return False + return None elif ratio == 1: return True