summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-09-23 00:18:24 -0400
committerChris McDonough <chrism@plope.com>2011-09-23 00:18:24 -0400
commit07ee180bf7561f7a6330c91b6d4833f55328b8f3 (patch)
treedf82f74695d05f55d5273d458231e696937e7ef1
parente916390ce0ac464e4d1356a7c33edc9c55c7cb7f (diff)
downloadpyramid-07ee180bf7561f7a6330c91b6d4833f55328b8f3.tar.gz
pyramid-07ee180bf7561f7a6330c91b6d4833f55328b8f3.tar.bz2
pyramid-07ee180bf7561f7a6330c91b6d4833f55328b8f3.zip
prevent a syntax error (this is not really correct)
-rw-r--r--pyramid/authentication.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pyramid/authentication.py b/pyramid/authentication.py
index 2bbe4d191..d75549d36 100644
--- a/pyramid/authentication.py
+++ b/pyramid/authentication.py
@@ -9,6 +9,7 @@ import urllib
from zope.interface import implementer
from pyramid.compat import long
+from pyramid.compat import text_type
from pyramid.interfaces import IAuthenticationPolicy
from pyramid.interfaces import IDebugLogger
@@ -548,7 +549,7 @@ class AuthTktCookieHelper(object):
userid_type_encoders = {
int: ('int', str),
long: ('int', str),
- unicode: ('b64unicode', lambda x: b64encode(utf_8_encode(x)[0])),
+ text_type: ('b64unicode', lambda x: b64encode(utf_8_encode(x)[0])),
str: ('b64str', lambda x: b64encode(x)),
}