Skip to content
Snippets Groups Projects
Commit 77749d59 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Python 3 fix for PersistentDict

parent 6799bb88
No related branches found
No related tags found
No related merge requests found
...@@ -174,13 +174,13 @@ class KeyBuilder(object): ...@@ -174,13 +174,13 @@ class KeyBuilder(object):
# {{{ updaters # {{{ updaters
def update_for_int(self, key_hash, key): def update_for_int(self, key_hash, key):
key_hash.update(str(key)) key_hash.update(str(key).encode("utf8"))
update_for_long = update_for_int update_for_long = update_for_int
update_for_bool = update_for_int update_for_bool = update_for_int
def update_for_float(self, key_hash, key): def update_for_float(self, key_hash, key):
key_hash.update(repr(key)) key_hash.update(repr(key).encode("utf8"))
if sys.version_info >= (3,): if sys.version_info >= (3,):
def update_for_str(self, key_hash, key): def update_for_str(self, key_hash, key):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment