Some Unicode fixes for Python 3

pull/2/head
Noah 2015-07-10 00:41:44 -07:00
parent e38ccc7190
commit ea2ef9876d
3 changed files with 11 additions and 1 deletions

View File

@ -188,7 +188,7 @@ def write_json(path, data):
flock(fh, LOCK_EX)
# Write it.
fh.write(json.dumps(data, sort_keys=True, indent=4, separators=(',', ': ')))
fh.write(json.dumps(data, indent=4, separators=(',', ': ')))
# Unlock and close.
flock(fh, LOCK_UN)

View File

@ -8,6 +8,11 @@ import time
import re
import glob
import os
import sys
if sys.version_info[0] > 2:
def unicode(s):
return s
from rophako.settings import Config
import rophako.jsondb as JsonDB

View File

@ -19,6 +19,11 @@ from rophako.plugin import load_plugin
from rophako.settings import Config
from rophako.log import logger
import sys
if sys.version_info[0] > 2:
def unicode(s):
return str(s)
mod = Blueprint("blog", __name__, url_prefix="/blog")
load_plugin("rophako.modules.comment")