build: be explicit about json file encoding
This commit is contained in:
parent
73acb53826
commit
dbe1c6ccae
|
@ -15,7 +15,7 @@ for dirname in sorted(os.listdir('static')):
|
||||||
config = os.path.join('static', dirname, 'config.json')
|
config = os.path.join('static', dirname, 'config.json')
|
||||||
if not os.path.exists(config):
|
if not os.path.exists(config):
|
||||||
continue
|
continue
|
||||||
theme = json.load(open(os.path.join('static', dirname, 'config.json')))
|
theme = json.load(open(os.path.join('static', dirname, 'config.json'), encoding='utf-8'))
|
||||||
theme['id'] = dirname
|
theme['id'] = dirname
|
||||||
if not 'variables' in theme:
|
if not 'variables' in theme:
|
||||||
theme['variables'] = {}
|
theme['variables'] = {}
|
||||||
|
@ -57,5 +57,5 @@ if os.path.exists('help/fr/misc-scss.page'):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
with open('themes.json', 'w') as fd:
|
with open('themes.json', 'w', encoding='utf-8') as fd:
|
||||||
json.dump({'themes': themes, 'parameters': parameters}, fd, indent=2, sort_keys=True)
|
json.dump({'themes': themes, 'parameters': parameters}, fd, indent=2, sort_keys=True)
|
||||||
|
|
Loading…
Reference in New Issue