From: Fredrik Tolf Date: Thu, 3 Apr 2014 04:16:59 +0000 (+0200) Subject: Apparently binascii.b2a_* returns bytes. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=707d1078fd415fa1e3244df70ebf07663103f42e;p=wrw.git Apparently binascii.b2a_* returns bytes. --- 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())