From a6039ae2fda5921084245ce027d7b708a70e9fa1 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 25 Jan 2010 19:37:19 +0100 Subject: Convert strings to unicode before adding pastes. --- pastepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pastepy.py b/pastepy.py index b44a424..20b386f 100644 --- a/pastepy.py +++ b/pastepy.py @@ -69,7 +69,7 @@ class Paste(object): try: session = db.Session() - paste = db.Paste(hash, nick, datetime.datetime.utcnow(), syntax, title, text) + paste = db.Paste(hash, nick.decode('utf8'), datetime.datetime.utcnow(), syntax.decode('utf8') if syntax else None, title.decode('utf8'), text.decode('utf8')) session.add(paste) session.commit() finally: -- cgit v1.2.3