Patch for sporadic --parse-errors in generic SQL errors (e.g. CrateDB)

This commit is contained in:
Miroslav Stampar
2020-02-02 22:01:57 +01:00
parent db126af86a
commit 4278bbce11
3 changed files with 11 additions and 5 deletions

View File

@@ -73,6 +73,10 @@ def htmlParser(page):
handler = HTMLHandler(page)
key = hash(page)
# generic SQL warning/error messages
if re.search(r"SQL (warning|error|syntax)", page, re.I):
handler._markAsErrorPage()
if key in kb.cache.parsedDbms:
retVal = kb.cache.parsedDbms[key]
if retVal:
@@ -89,8 +93,4 @@ def htmlParser(page):
kb.cache.parsedDbms[key] = handler.dbms
# generic SQL warning/error messages
if re.search(r"SQL (warning|error|syntax)", page, re.I):
handler._markAsErrorPage()
return handler.dbms