Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
fa33ec52
Commit
fa33ec52
authored
Oct 09, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a crude python2/python3 hack to deal with UTF-8
parent
eeed23f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
vtc-syntax.py
doc/sphinx/vtc-syntax.py
+6
-1
No files found.
doc/sphinx/vtc-syntax.py
View file @
fa33ec52
...
...
@@ -39,7 +39,12 @@ def parse_file(fn, cl, tl, sl):
section
=
""
resec
=
re
.
compile
(
"[ /]
\
* SECTION: "
)
f
=
open
(
fn
,
"r"
)
try
:
# Python3
f
=
open
(
fn
,
"r"
,
encoding
=
"UTF-8"
)
except
TypeError
:
# Python2
f
=
open
(
fn
,
"r"
)
for
l
in
f
:
if
"*/"
in
l
:
...
...
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