summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-08-18 00:40:49 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-08-18 00:40:49 +0200
commitece147f7690e4ebfed0079b583df03080caca1b0 (patch)
tree80ee76675de3260a14aac324700115e6c06dd871
parent4242aee2a4d120988ad2cbe84a5db6ac9d7bc9c6 (diff)
Fixed error in unicode handling.
-rw-r--r--pastepy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pastepy.py b/pastepy.py
index 683d300..0451f68 100644
--- a/pastepy.py
+++ b/pastepy.py
@@ -123,7 +123,7 @@ class Paste(object):
except: # No cache found, generate it.
paste = session.query(db.Paste).filter_by(hash = hash).one()
try:
- lexername, text = get_formatted(paste.syntax, paste.text if type(str) == unicode else paste.text.decode('utf8'))
+ lexername, text = get_formatted(paste.syntax, paste.text if type(paste.text) == unicode else paste.text.decode('utf8'))
except:
return self.message('Could not find the lexer "%s".' % paste.syntax, 'Error')
cache = db.Cache(hash, lexername, text)