summaryrefslogtreecommitdiff
path: root/QMTest/TestCmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'QMTest/TestCmd.py')
-rw-r--r--QMTest/TestCmd.py2
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()