浏览代码

[desktop] Don't compare regexes by address

Erick Tryzelaar 10 年之前
父节点
当前提交
4a6448f970
共有 1 个文件被更改,包括 2 次插入1 次删除
  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 \
     return \
         isinstance(other, self.__class__) and \
         isinstance(other, self.__class__) and \
         self.trigger == other.trigger 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
         self.replace == other.replace
 
 
   def __ne__(self, other):
   def __ne__(self, other):