From 3cecc0b83d96571fee35f2ac1f1791588443d0a2 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Mon, 4 Apr 2016 17:01:39 +0000 Subject: [PATCH] Return a str() from _encode_base64(), not bytes(). --- quixote/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quixote/util.py b/quixote/util.py index 2e3202e..e15afec 100644 --- a/quixote/util.py +++ b/quixote/util.py @@ -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