8344: Ensure key is correct type when updating reference map
This commit is contained in:
parent
30d809ed17
commit
71ae1fbca3
@ -1235,7 +1235,11 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
|||||||
existing_references = set()
|
existing_references = set()
|
||||||
primary_cur = self.get_reference_map_primary_cursor()
|
primary_cur = self.get_reference_map_primary_cursor()
|
||||||
try:
|
try:
|
||||||
ret = primary_cur.set(handle)
|
if isinstance(handle, UNITYPE):
|
||||||
|
key = handle.encode('utf-8')
|
||||||
|
else:
|
||||||
|
key = handle
|
||||||
|
ret = primary_cur.set(key)
|
||||||
except:
|
except:
|
||||||
ret = None
|
ret = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user