Return a str() from _encode_base64(), not bytes().

This commit is contained in:
Neil Schemenauer 2016-04-04 17:01:39 +00:00
parent c049096369
commit 3cecc0b83d
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ from quixote.html import htmltext, TemplateIO
from quixote.http_response import Stream
def _encode_base64(s):
return base64.urlsafe_b64encode(s).rstrip('=\n')
return base64.urlsafe_b64encode(s).rstrip(b'=\n').decode('ascii')
if hasattr(os, 'urandom'):
# available in Python 2.4 and also works on win32