aboutsummaryrefslogtreecommitdiffstats
path: root/tests/system/shared/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/system/shared/utils.py')
-rw-r--r--tests/system/shared/utils.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py
index 7397fad5ed..96e63f29f0 100644
--- a/tests/system/shared/utils.py
+++ b/tests/system/shared/utils.py
@@ -513,8 +513,13 @@ def progressBarWait(timeout=60000, warn=True):
checkIfObjectExists(":Qt Creator_Core::Internal::ProgressBar", False, timeout)
def readFile(filename):
- with open(filename, "r") as f:
- return f.read()
+ try:
+ with open(filename, "r") as f:
+ return f.read()
+ except:
+ # Read file as binary
+ with open(filename, "rb") as f:
+ return f.read()
def simpleFileName(navigatorFileName):
# try to find the last part of the given name, assume it's inside a (folder) structure