forked from qt-creator/qt-creator
SquishTests: Further Python3 adaption
Fixing tests in suite_editors Change-Id: I4e5e1adc2c4e6606232d76a794aff7a7144d5c9e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user