From 09319b167516bf8d30c087c759a2039de8f59b3b Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 26 Jan 2015 18:13:42 -0600 Subject: [PATCH] Don't die on broken regexes. --- earwigbot/wiki/copyvios/exclusions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/earwigbot/wiki/copyvios/exclusions.py b/earwigbot/wiki/copyvios/exclusions.py index aa7d90f..f5faf7c 100644 --- a/earwigbot/wiki/copyvios/exclusions.py +++ b/earwigbot/wiki/copyvios/exclusions.py @@ -182,7 +182,10 @@ class ExclusionsDB(object): excl_path = excl[excl.index("/") + 1] matches = excl_path.startswith(parsed.path) elif excl.startswith("re:"): - matches = re.match(excl[3:], normalized) + try: + matches = re.match(excl[3:], normalized) + except re.error: + continue else: matches = normalized.startswith(excl) if matches: