summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-01-25 19:37:19 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-01-25 19:37:19 +0100
commita6039ae2fda5921084245ce027d7b708a70e9fa1 (patch)
tree1d6f978797b63b853140ce8303dfbb97a2320f7a
parentfe7223827b8e9f33e2d5d1e50331491f8018ae7f (diff)
Convert strings to unicode before adding pastes.
-rw-r--r--pastepy.py2
1 files changed, 1 insertions, 1 deletions
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: