Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2b521f

Browse files
committed
gready regex bastard :)
1 parent 9579a97 commit b2b521f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ def extractErrorMessage(page):
15391539
retVal = None
15401540

15411541
if isinstance(page, basestring):
1542-
for regex in (r"<b>[^<]*(fatal|error|warning|exception)[^<]*</b>:?\s+(?P<result>.+)<br\s*/?\s*>", r"<li>Error Type:<br>(?P<result>.+?)</li>"):
1542+
for regex in (r"<b>[^<]*(fatal|error|warning|exception)[^<]*</b>:?\s+(?P<result>.+?)<br\s*/?\s*>", r"<li>Error Type:<br>(?P<result>.+?)</li>"):
15431543
match = re.search(regex, page, re.DOTALL | re.IGNORECASE)
15441544
if match:
15451545
retVal = htmlunescape(match.group("result")).replace("<br>", "\n").strip()

0 commit comments

Comments
 (0)