fix base object hasing. Closes #120 .

This commit is contained in:
Ivan Malison 2015-01-08 16:05:28 -08:00
parent 3f9137a700
commit de31fc33f6
3 changed files with 5 additions and 4 deletions

View file

@ -1328,9 +1328,9 @@ class _BaseObject(object):
def __hash__(self):
# Convert any ints (or whatever) into strings
values = map(str, self._get_params().values())
values = map(six.text_type, self._get_params().values())
return hash(self.network) + hash(str(type(self)) + "".join(
return hash(self.network) + hash(six.text_type(type(self)) + "".join(
list(self._get_params().keys()) + list(values)
).lower())