This commit is contained in:
Miroslav Stampar
2019-06-26 11:06:50 +02:00
parent de77ce131f
commit 39cb938827
2 changed files with 2 additions and 2 deletions

View File

@@ -2664,7 +2664,7 @@ def extractErrorMessage(page):
if match:
candidate = htmlUnescape(match.group("result")).replace("<br>", "\n").strip()
if (1.0 * len(re.findall(r"[^A-Za-z,. ]", candidate))) / len(candidate) > MIN_ERROR_PARSING_NON_WRITING_RATIO:
if candidate and (1.0 * len(re.findall(r"[^A-Za-z,. ]", candidate)) / len(candidate) > MIN_ERROR_PARSING_NON_WRITING_RATIO):
retVal = candidate
break