浏览代码

[libsentry] Workaround iin API v1 for THRIFT-3388 hash doesn't work on set/list

Romain Rigaux 10 年之前
父节点
当前提交
333b8b0baf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/libsentry/gen-py/sentry_policy_service/ttypes.py

+ 1 - 1
desktop/libs/libsentry/gen-py/sentry_policy_service/ttypes.py

@@ -1615,7 +1615,7 @@ class TSentryRole(object):
   def __hash__(self):
     value = 17
     value = (value * 31) ^ hash(self.roleName)
-    value = (value * 31) ^ hash(self.groups)
+    value = (value * 31) ^ hash(frozenset(self.groups))
     value = (value * 31) ^ hash(self.grantorPrincipal)
     return value