Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 646880 | Differences between
and this patch

Collapse All | Expand All

(-)a/scripts/MakeHeader.py (-3 / +3 lines)
Lines 1-5 Link Here
1
#!/usr/bin/env python
1
#!/usr/bin/env python
2
import os, sys, string
2
import os, sys, string, io
3
try:
3
try:
4
   from cStringIO import StringIO
4
   from cStringIO import StringIO
5
except ImportError:
5
except ImportError:
Lines 16-22 SKIPONE=4 Link Here
16
state = ANY
16
state = ANY
17
static = 0
17
static = 0
18
18
19
file = open(sys.argv[1])
19
file = io.open(sys.argv[1], "r", errors="ignore")
20
name = sys.argv[1][:-2]
20
name = sys.argv[1][:-2]
21
21
22
out = StringIO()
22
out = StringIO()
Lines 94-100 out.write( "#endif\n" ) Link Here
94
# This prevents a lot of recompilation during development
94
# This prevents a lot of recompilation during development
95
out.seek(0)
95
out.seek(0)
96
try:
96
try:
97
   with open(name + ".h", "r") as orig:
97
   with io.open(name + ".h", "r", errors="ignore") as orig:
98
      origcontents = orig.readlines()
98
      origcontents = orig.readlines()
99
except:
99
except:
100
   origcontents = ""
100
   origcontents = ""

Return to bug 646880