forked from qt-creator/qt-creator
SquishTests: Remove compatibility code for Python 2
Change-Id: Ibcf9a76fb163aa7167ad0ef0616c39b33c30d7c5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -595,15 +595,12 @@ def getHelpTitle():
|
||||
|
||||
|
||||
def isString(sth):
|
||||
if sys.version_info.major > 2:
|
||||
return isinstance(sth, str)
|
||||
else:
|
||||
return isinstance(sth, (str, unicode))
|
||||
return isinstance(sth, str)
|
||||
|
||||
|
||||
# helper function to ensure we get str, converts bytes if necessary
|
||||
def stringify(obj):
|
||||
stringTypes = (str, unicode) if sys.version_info.major == 2 else (str)
|
||||
if isinstance(obj, stringTypes):
|
||||
if isString(obj):
|
||||
return obj
|
||||
if isinstance(obj, bytes):
|
||||
if not platform.system() in ('Microsoft', 'Windows'):
|
||||
|
||||
Reference in New Issue
Block a user