From 21e91efbf9cb064f1fcd19ba7a77ba81a6c843f5 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Wed, 25 Feb 2015 00:21:55 -0800 Subject: [PATCH] Save the session-key as a unicode string in the db The session-key should be saved as a string, not a byte string. --- isso/db/preferences.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isso/db/preferences.py b/isso/db/preferences.py index 275819e..28936e4 100644 --- a/isso/db/preferences.py +++ b/isso/db/preferences.py @@ -7,7 +7,7 @@ import binascii class Preferences: defaults = [ - ("session-key", binascii.b2a_hex(os.urandom(24))), + ("session-key", binascii.b2a_hex(os.urandom(24)).decode('utf-8')), ] def __init__(self, db):