Mercurial > p > roundup > code
changeset 5441:a14c0e652e25
Python 3 preparation: use bytes in _gen_sid.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Wed, 25 Jul 2018 12:28:08 +0000 |
| parents | 60535a4822ab |
| children | afd9fd3a0edb |
| files | roundup/cgi/client.py |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/client.py Wed Jul 25 11:44:49 2018 +0000 +++ b/roundup/cgi/client.py Wed Jul 25 12:28:08 2018 +0000 @@ -50,7 +50,7 @@ from email.mime.multipart import MIMEMultipart import roundup.anypy.email_ -from roundup.anypy.strings import s2b, uchr +from roundup.anypy.strings import s2b, b2s, uchr def initialiseSecurity(security): '''Create some Permissions and Roles on the security object @@ -178,7 +178,7 @@ """ generate a unique session key """ while 1: s = '%s%s'%(time.time(), random.random()) - s = binascii.b2a_base64(s).strip() + s = b2s(binascii.b2a_base64(s2b(s)).strip()) if not self.session_db.exists(s): break
