Explorar o código

[desktop] Don't compare regexes by address

Erick Tryzelaar %!s(int64=10) %!d(string=hai) anos
pai
achega
4a6448f
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      desktop/core/src/desktop/redaction/engine.py

+ 2 - 1
desktop/core/src/desktop/redaction/engine.py

@@ -119,7 +119,8 @@ class RedactionRule(object):
     return \
         isinstance(other, self.__class__) and \
         self.trigger == other.trigger and \
-        self.regex == other.regex and \
+        self.regex.pattern == other.regex.pattern and \
+        self.regex.flags == other.regex.flags and \
         self.replace == other.replace
 
   def __ne__(self, other):