Fix eptid key encoding for python 3
In python3 shelve wants strings for keys, but we were forcing bytes for some reason.
This commit is contained in:
parent
c2f95ccfbe
commit
caa0eb8a00
@ -42,6 +42,8 @@ class Eptid(object):
|
||||
return self._db[key]
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
if six.PY3 and isinstance(key, six.binary_type):
|
||||
key = key.decode('utf-8')
|
||||
self._db[key] = value
|
||||
|
||||
def get(self, idp, sp, *args):
|
||||
|
@ -111,9 +111,6 @@ class IdentDB(object):
|
||||
:param ident: user identifier
|
||||
:param name_id: NameID instance
|
||||
"""
|
||||
if isinstance(ident, six.string_types):
|
||||
ident = ident.encode("utf-8")
|
||||
|
||||
# One user may have more than one NameID defined
|
||||
try:
|
||||
val = self.db[ident].split(" ")
|
||||
|
Loading…
Reference in New Issue
Block a user