Skip to content

Commit

Permalink
zos: don't use universal-new-lines mode
Browse files Browse the repository at this point in the history
This reverts commit 40edac20c8c9644067636e5722c389954890bccf.
  • Loading branch information
jBarz committed May 30, 2018
1 parent ba59f82 commit 32d008a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gyp/pylib/gyp/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes,
# Open the build file for read ('r') with universal-newlines mode ('U')
# to make sure platform specific newlines ('\r\n' or '\r') are converted to '\n'
# which otherwise will fail eval()
build_file_contents = open(build_file_path, 'rU').read()
if sys.platform == 'zos':
# On z/OS, universal-newlines mode treats the file as an ascii file. But since
# node-gyp produces ebcdic files, do not use that mode.
build_file_contents = open(build_file_path, 'r').read()
else:
build_file_contents = open(build_file_path, 'rU').read()
else:
raise GypError("%s not found (cwd: %s)" % (build_file_path, os.getcwd()))

Expand Down

0 comments on commit 32d008a

Please sign in to comment.