replace use of 'a.find(b) != -1' --> 'b in a'

This commit is contained in:
Campbell Barton 2013-06-24 05:55:05 +00:00
parent 86bebb3380
commit a5b78bb6bd
5 changed files with 14 additions and 16 deletions

@ -31,7 +31,7 @@ builder = sys.argv[1]
# we run from build/ directory
blender_dir = '../blender'
if builder.find('cmake') != -1:
if "cmake" in builder:
# cmake
retcode = subprocess.call(['ctest', '.' '--output-on-failure'])
sys.exit(retcode)

@ -3,13 +3,12 @@ import subprocess
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
if CL_STDERR.find("17.00.") == -1:
VC_VERSION = '9.0'
LCGDIR = '#../lib/windows'
else:
if "17.00." in CL_STDERR:
VC_VERSION = '11.0'
LCGDIR = '#../lib/windows_vc11'
else:
VC_VERSION = '9.0'
LCGDIR = '#../lib/windows'
LIBDIR = '${LCGDIR}'

@ -3,13 +3,12 @@ import subprocess
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
if CL_STDERR.find("17.00.") == -1:
VC_VERSION = '9.0'
LCGDIR = '#../lib/win64'
else:
if "17.00." in CL_STDERR:
VC_VERSION = '11.0'
LCGDIR = '#../lib/win64_vc11'
else:
VC_VERSION = '9.0'
LCGDIR = '#../lib/win64'
LIBDIR = '${LCGDIR}'

@ -847,7 +847,7 @@ class BlenderEnvironment(SConsEnvironment):
def list_substring(quickie, libname):
for q in quickie:
if libname.find(q) != -1:
if q in libname:
return True
return False

@ -674,10 +674,10 @@ def buildslave(target=None, source=None, env=None):
if platform == 'linux':
import platform
if env['BF_INSTALLDIR'].find('glibc27') != -1:
glibc="glibc27"
elif env['BF_INSTALLDIR'].find('glibc211') != -1:
glibc="glibc211"
if "glibc27" in env['BF_INSTALLDIR']:
glibc = "glibc27"
elif "glibc211" in env['BF_INSTALLDIR']:
glibc = "glibc211"
bitness = platform.architecture()[0]
if bitness == '64bit':