summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-11-12 23:21:15 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-11-12 23:21:15 (GMT)
commit74416af9dc7900d30c41a16d3b56cf4ea00ec137 (patch)
tree44a1861841a1c55e7343d67b72a6afc893483b17 /Tools
parent3d03968c75f834dcd9d58b4aaf7475d9d2d72d43 (diff)
downloadcpython-74416af9dc7900d30c41a16d3b56cf4ea00ec137.zip
cpython-74416af9dc7900d30c41a16d3b56cf4ea00ec137.tar.gz
cpython-74416af9dc7900d30c41a16d3b56cf4ea00ec137.tar.bz2
Fix SF # 464405, freeze doesn't like DOS files on Linux
Use universal newline support when opening a file for freezing.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/freeze/modulefinder.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/freeze/modulefinder.py b/Tools/freeze/modulefinder.py
index aef887f..96fc2f7 100644
--- a/Tools/freeze/modulefinder.py
+++ b/Tools/freeze/modulefinder.py
@@ -116,14 +116,14 @@ class ModuleFinder:
def run_script(self, pathname):
self.msg(2, "run_script", pathname)
- fp = open(pathname)
+ fp = open(pathname, "U")
stuff = ("", "r", imp.PY_SOURCE)
self.load_module('__main__', fp, pathname, stuff)
def load_file(self, pathname):
dir, name = os.path.split(pathname)
name, ext = os.path.splitext(name)
- fp = open(pathname)
+ fp = open(pathname, "U")
stuff = (ext, "r", imp.PY_SOURCE)
self.load_module(name, fp, pathname, stuff)