diff options
author | Jane Doe <jdoe@example.com> | 2017-05-27 17:43:03 -0700 |
---|---|---|
committer | Jane Doe <jdoe@example.com> | 2017-05-27 17:43:03 -0700 |
commit | c8fc53b4c0dc0c37fc810aa0f0495a97fc88dba9 (patch) | |
tree | dc334093fb5d507a2272f8849d0a4d0435dde042 /QMTest | |
parent | 73dd794c4cd047a60918a8256e47a371323f43f9 (diff) | |
download | scons-c8fc53b4c0dc0c37fc810aa0f0495a97fc88dba9.tar.gz |
py2/3 in test.read, if using py3 and not binary, then allow specifying what to do with newline. PY3 will automatically translate it which can yield \r\r\n's in files
Diffstat (limited to 'QMTest')
-rw-r--r-- | QMTest/TestCmd.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index cc8e69a1..aec51d0a 100644 --- a/QMTest/TestCmd.py +++ b/QMTest/TestCmd.py @@ -1245,7 +1245,7 @@ class TestCmd(object): file = self.canonicalize(file) if mode[0] != 'r': raise ValueError("mode must begin with 'r'") - if PY3: + if PY3 and 'b' not in mode: return open(file, mode, newline=newline).read() else: return open(file, mode).read() |