summaryrefslogtreecommitdiff
path: root/QMTest
diff options
context:
space:
mode:
Diffstat (limited to 'QMTest')
-rw-r--r--QMTest/TestCmd.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py
index 0e7bc514..e4c69a6e 100644
--- a/QMTest/TestCmd.py
+++ b/QMTest/TestCmd.py
@@ -1448,7 +1448,10 @@ class TestCmd(object):
TODO: Do we need to pass universal newlines into this function?
"""
- if sys.version_info[0] == 3 and sys.version_info[1] < 6:
+
+ if not stream:
+ return stream
+ elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
stream = stream.decode('utf-8')
stream = stream.replace('\r\n', '\n')
elif sys.version_info[0] == 2: