Remove deprecated locale flag

re.L is deprecated and re.U is now default.

(cherry picked from commit da3db4bc28)

Fixes #10136
This commit is contained in:
Nick Hall 2016-04-06 23:18:09 +01:00 committed by Paul Franklin
parent 9e12a5d364
commit 60f944adcf

View File

@ -82,9 +82,7 @@ class Rule(object):
for i in range(len(self.labels)):
if self.list[i]:
try:
self.regex[i] = re.compile(
str(self.list[i]),
re.I|re.U|re.L)
self.regex[i] = re.compile(self.list[i], re.I)
except re.error:
self.regex[i] = re.compile('')
self.match_substring = self.match_regex