Commit 401a3498 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

EncryptedPasswordMixin: py3

parent 46643eda
......@@ -84,6 +84,8 @@ class EncryptedPasswordMixin(object):
value,
format='default', # pylint: disable=redefined-builtin
):
if value is not None and not isinstance(value, bytes):
value = value.encode()
password = getattr(aq_base(self), 'password', None)
if password is None or isinstance(password, basestring):
password = self.password = PersistentMapping()
......@@ -113,8 +115,6 @@ class EncryptedPasswordMixin(object):
security.declareProtected(Permissions.AccessContentsInformation, 'getPassword')
def getPassword(self, *args, **kw):
"""
"""
marker = []
if len(args):
default_password = args[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment