Skip to content
Permalink
Browse files

unicode is magic

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 24, 2015
1 parent 09050ac commit f70b5a8f28f3ff57b6dc2ab9fc50c4c0fae5e904
Showing with 4 additions and 4 deletions.
  1. +4 −4 scripts/build_themes.py
@@ -3,7 +3,7 @@
"""Build themes."""

from __future__ import unicode_literals, print_function
import codecs
import io
from contextlib import contextmanager
import glob
import json
@@ -76,10 +76,10 @@ def init_theme(theme):
extra_conf_path = utils.get_asset_path('conf.py.sample', themes, _themes_dir='v7')
extra_conf = ''
if extra_conf_path:
extra_conf = open(extra_conf_path, 'r').read()
extra_conf = io.open(extra_conf_path, 'r', encoding="utf-8").read()

with codecs.open(conf_path, "a", "utf-8") as conf:
conf.write("\n\n{2}\n\nTHEME = '{0}'\n\nUSE_BUNDLES = False\n\nOUTPUT_FOLDER = '{1}'\n\nSOCIAL_BUTTONS_CODE = ''\n".format(theme, o_path, extra_conf))
with io.open(conf_path, "a", encoding="utf-8") as conf:
conf.write(u"\n\n{2}\n\nTHEME = '{0}'\n\nUSE_BUNDLES = False\n\nOUTPUT_FOLDER = '{1}'\n\nSOCIAL_BUTTONS_CODE = ''\n".format(theme, o_path, extra_conf))

@contextmanager
def cd(path):

0 comments on commit f70b5a8

Please sign in to comment.
You can’t perform that action at this time.