From b2b521fc8a1d36c905eeef542a8f33ecd70a8ba5 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 24 Nov 2010 12:01:36 +0000 Subject: [PATCH] gready regex bastard :) --- lib/core/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 58245c045..e8d0a4438 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1539,7 +1539,7 @@ def extractErrorMessage(page): retVal = None if isinstance(page, basestring): - for regex in (r"[^<]*(fatal|error|warning|exception)[^<]*:?\s+(?P.+)", r"
  • Error Type:
    (?P.+?)
  • "): + for regex in (r"[^<]*(fatal|error|warning|exception)[^<]*:?\s+(?P.+?)", r"
  • Error Type:
    (?P.+?)
  • "): match = re.search(regex, page, re.DOTALL | re.IGNORECASE) if match: retVal = htmlunescape(match.group("result")).replace("
    ", "\n").strip()