From 707d1078fd415fa1e3244df70ebf07663103f42e Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 3 Apr 2014 06:16:59 +0200 Subject: [PATCH] Apparently binascii.b2a_* returns bytes. --- wrw/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrw/session.py b/wrw/session.py index 3185b0b..e9425c3 100644 --- a/wrw/session.py +++ b/wrw/session.py @@ -8,7 +8,7 @@ def gennonce(length): class session(object): def __init__(self, lock, expire=86400 * 7): - self.id = binascii.b2a_hex(gennonce(16)) + self.id = binascii.b2a_hex(gennonce(16)).encode("us-ascii") self.dict = {} self.lock = lock self.ctime = self.atime = self.mtime = int(time.time()) -- 2.11.0