diff options
-rw-r--r-- | pastepy.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) + lexername, text = get_formatted(paste.syntax, paste.text if type(str) == 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) |