diff --git a/lib/parse/headers.py b/lib/parse/headers.py index 8430ea29b..07e58de42 100644 --- a/lib/parse/headers.py +++ b/lib/parse/headers.py @@ -39,7 +39,7 @@ def headersParser(headers): } for header in headers: - if header in topHeaders.keys(): + if header in topHeaders: value = headers[header] xmlfile = topHeaders[header] diff --git a/lib/parse/html.py b/lib/parse/html.py index 5cf43f98f..22ae7d82d 100644 --- a/lib/parse/html.py +++ b/lib/parse/html.py @@ -28,8 +28,6 @@ class htmlHandler(ContentHandler): self.__dbms = None self.__page = page - self.__regexp = None - self.__match = None self.dbms = None @@ -37,13 +35,9 @@ class htmlHandler(ContentHandler): if name == "dbms": self.__dbms = attrs.get("value") - if name == "error": - self.__regexp = attrs.get("regexp") - self.__match = re.search(self.__regexp, self.__page, re.I) - - if self.__match: + elif name == "error": + if re.search(attrs.get("regexp"), self.__page, re.I): self.dbms = self.__dbms - self.__match = None threadData = getCurrentThreadData() threadData.lastErrorPage = (threadData.lastRequestUID, self.__page)