Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
0e4333d7
Commit
0e4333d7
authored
Feb 10, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Feb 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(configd) unicode issue in template generation
(cherry picked from commit
1363689d
)
parent
49ad2356
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
configd.py
src/opnsense/service/configd.py
+1
-0
template.py
src/opnsense/service/modules/template.py
+2
-1
No files found.
src/opnsense/service/configd.py
View file @
0e4333d7
#!/usr/local/bin/python2.7
#!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
"""
Copyright (c) 2014 Ad Schellevis
Copyright (c) 2014 Ad Schellevis
...
...
src/opnsense/service/modules/template.py
View file @
0e4333d7
...
@@ -36,6 +36,7 @@ import os.path
...
@@ -36,6 +36,7 @@ import os.path
import
syslog
import
syslog
import
collections
import
collections
import
copy
import
copy
import
codecs
import
jinja2
import
jinja2
import
addons.template_helpers
import
addons.template_helpers
...
@@ -262,7 +263,7 @@ class Template(object):
...
@@ -262,7 +263,7 @@ class Template(object):
# make sure the target directory exists
# make sure the target directory exists
self
.
_create_directory
(
filename
)
self
.
_create_directory
(
filename
)
f_out
=
open
(
filename
,
'wb'
)
f_out
=
codecs
.
open
(
filename
,
'wb'
,
encoding
=
"utf-8"
)
f_out
.
write
(
content
)
f_out
.
write
(
content
)
# Check if the last character of our output contains an end-of-line, if not copy it in if
# 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.
# it was in the original template.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment