summaryrefslogtreecommitdiffstats
path: root/Tools/bgen
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-08-04 21:55:25 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-08-04 21:55:25 (GMT)
commitbae7734eef9cbbdcadced065873ad3da6101923a (patch)
treed5cd8399e1981b7d666694a9f5005807358f99e2 /Tools/bgen
parent0c069924e5e2a1bc254355a592cd0bdac28d316f (diff)
downloadcpython-bae7734eef9cbbdcadced065873ad3da6101923a.zip
cpython-bae7734eef9cbbdcadced065873ad3da6101923a.tar.gz
cpython-bae7734eef9cbbdcadced065873ad3da6101923a.tar.bz2
Use universal newline input when scanning header files.
Diffstat (limited to 'Tools/bgen')
-rw-r--r--Tools/bgen/bgen/scantools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/bgen/bgen/scantools.py b/Tools/bgen/bgen/scantools.py
index 9256c4f..d5dc2af 100644
--- a/Tools/bgen/bgen/scantools.py
+++ b/Tools/bgen/bgen/scantools.py
@@ -219,7 +219,7 @@ if missing: raise "Missing Types"
def openrepairfile(self, filename = "REPAIR"):
try:
- return open(filename, "r")
+ return open(filename, "rU")
except IOError, msg:
print `filename`, ":", msg
print "Cannot open repair file -- assume no repair needed"
@@ -359,12 +359,12 @@ if missing: raise "Missing Types"
fullname = os.path.join(dir, filename)
#self.report("trying full name %s", `fullname`)
try:
- return open(fullname, 'r')
+ return open(fullname, 'rU')
except IOError:
pass
# If not on the path, or absolute, try default open()
try:
- return open(filename, 'r')
+ return open(filename, 'rU')
except IOError, arg:
raise IOError, (arg, filename)