Merge "partitioner: do not use hash() to determine object identity" into stable/queens

This commit is contained in:
Zuul 2018-02-14 18:00:12 +00:00 committed by Gerrit Code Review
commit c8dff4fd0d
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class Partitioner(object):
def _hash_object(obj):
if hasattr(obj, "__tooz_hash__"):
return obj.__tooz_hash__()
return str(hash(obj)).encode('ascii')
return str(obj).encode()
def members_for_object(self, obj, ignore_members=None, replicas=1):
"""Return the members responsible for an object.