mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
(configd) unicode issue in template generation
This commit is contained in:
parent
5e2a99f61a
commit
1363689dc7
@ -1,4 +1,5 @@
|
||||
#!/usr/local/bin/python2.7
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Copyright (c) 2014 Ad Schellevis
|
||||
|
||||
@ -33,6 +33,7 @@ import os.path
|
||||
import syslog
|
||||
import collections
|
||||
import copy
|
||||
import codecs
|
||||
import jinja2
|
||||
import addons.template_helpers
|
||||
|
||||
@ -264,7 +265,7 @@ class Template(object):
|
||||
# make sure the target directory exists
|
||||
self._create_directory(filename)
|
||||
|
||||
f_out = open(filename, 'wb')
|
||||
f_out = codecs.open(filename, 'wb', encoding="utf-8")
|
||||
f_out.write(content)
|
||||
# Check if the last character of our output contains an end-of-line, if not copy it in if
|
||||
# it was in the original template.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user