def PreConfigChecks(agsSiteAdminUserName, password):
    try:
    
        success = True
        msgPrefix = "Failed: "
        print
        print "--Running pre-configuration checks..."
        print
        
        # ---------------------------------------------------------------------
        # Check if site already exists
        # ---------------------------------------------------------------------
        if siteExistsCheck:
            print "\t-Checking if ArcGIS Server site already exists on server '" + serverName + "'"
            token = getToken(agsSiteAdminUserName, password, serverName, serverPort)
	    print
            if token is None:
                # Site does not exist; so configuration can continue.
                print "\tPassed: ArcGIS Server site does _not_ exist.\n"
                success = True
            else:
                # Site EXISTS; so we don't want configuration of server to continue.
                print "\t**Failed: ArcGIS Server site already exists.\n"
                success = False
	    print
	    
        # ---------------------------------------------------------------------
        # Check if databases already exist
        # ---------------------------------------------------------------------           
        
        if dbExistsCheck:
            print "\t-Checking if databases already exist..."
            print
            dbList = getPostgreSQLDatabases(password)
            
            #Convert list to comma-separated string
            dbListAsStr = str(dbList).strip('[]')
            dbListAsStr = dbListAsStr.replace("'", "").lower()
            
            print
            for db in dbsForOpsServer:
                if -1 > dbListAsStr.find(db.lower()):
                    success = False
                    print "\t\t**Failed: database '" + db + "' already exists."
                else:
                    print "\t\tPassed: database '" + db + "' does _not_ exist."
            
    except:
        success = False
        
        # Get the traceback object
        tb = sys.exc_info()[2]
        tbinfo = traceback.format_tb(tb)[0]
     
        # Concatenate information together concerning the error into a message string
        pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
        msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages() + "\n"
        
        # Print Python error messages for use in Python / Python Window
        print
        print "***** ERROR ENCOUNTERED *****"
        print pymsg + "\n"
        print msgs
        
    finally:
        # Return success flag
        return success
dataset/ETHPy150Open Esri/ops-server-config/Install/ArcGISServer/SupportFiles/PreConfigurationChecks.py/PreConfigChecks/swapped operands of `>`