Ver a proveniência

Don't die on broken regexes.

tags/v0.2
Ben Kurtovic há 9 anos
ascendente
cometimento
09319b1675
1 ficheiros alterados com 4 adições e 1 eliminações
  1. +4
    -1
      earwigbot/wiki/copyvios/exclusions.py

+ 4
- 1
earwigbot/wiki/copyvios/exclusions.py Ver ficheiro

@@ -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:


Carregando…
Cancelar
Guardar