def CheckOracleHome(directoryToCheck):
    global oracleHome, oracleVersion, oracleLibDir
    import os
    import struct
    import sys
    if ("win32", "cygwin") in sys.platform:
        subDirs = ["bin"]
        filesToCheck = [
                ("11g", "oraocci11.dll"),
                ("10g", "oraocci10.dll"),
                ("9i", "oraclient9.dll")
        ]
    elif sys.platform == "darwin":
        subDirs = ["lib"]
        filesToCheck = [
                ("11g", "libclntsh.dylib.11.1"),
                ("10g", "libclntsh.dylib.10.1"),
                ("9i", "libclntsh.dylib.9.0")
        ]
    else:
        if struct.calcsize("P") == 4:
            subDirs = ["lib", "lib32"]
        else:
            subDirs = ["lib", "lib64"]
        filesToCheck = [
                ("11g", "libclntsh.so.11.1"),
                ("10g", "libclntsh.so.10.1"),
                ("9i", "libclntsh.so.9.0")
        ]
    for version, baseFileName in filesToCheck:
        fileName = os.path.join(directoryToCheck, baseFileName)
        if os.path.exists(fileName):
            if os.path.basename(directoryToCheck).lower() == "bin":
                oracleHome = os.path.dirname(directoryToCheck)
            else:
                oracleHome = directoryToCheck
            oracleLibDir = directoryToCheck
            oracleVersion = version
            return True
        for subDir in subDirs:
            fileName = os.path.join(directoryToCheck, subDir, baseFileName)
            if os.path.exists(fileName):
                oracleHome = directoryToCheck
                oracleLibDir = os.path.join(directoryToCheck, subDir)
                oracleVersion = version
                return True
            dirName = os.path.dirname(directoryToCheck)
            fileName = os.path.join(dirName, subDir, baseFileName)
            if os.path.exists(fileName):
                oracleHome = dirName
                oracleLibDir = os.path.join(dirName, subDir)
                oracleVersion = version
                return True
    oracleHome = oracleVersion = oracleLibDir = None
    return False

# try to determine the Oracle home
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cx_Oracle-5.1.2/setup.py/CheckOracleHome/swapped operands of `in`