def check_args():
    # ---------------------------------------------------------------------
    # Check arguments
    # ---------------------------------------------------------------------
    arcgis_com_map_text = 'Portal Map Viewer'
    
    if len(sys.argv) < 6:
        
        print '\n' + scriptName + ' <AGS_FQDN> <Port> <AdminUser> <AdminPassword> <Use_SSL: Yes|No> {ArcGIS_Map_Text}'
    
        print '\nWhere:'
        print '\t<AGS_FQDN> (required parameter): the fully qualified domain name of the ArcGIS Server.'
        print '\n\t<Port> (required parameter): the port number of the ArcGIS Server (specify # if no port).'
        print '\n\t<AdminUser> (required parameter): ArcGIS Server site administrator.'
        print '\n\t<AdminPassword> (required parameter): Password for ArcGIS Server site administrator.'
        print '\n\t<Use_SSL: Yes|No> (required) Flag indicating if ArcGIS Server security configuration requires HTTPS.'
        print '\n\t{ArcGIS_Map_Text} (optional) value for arcgis.com.map.text property; if not specified, value set to "' + arcgis_com_map_text + '".'
        print '\nPurpose:'
        print '\tSets the paths of the ArcGIS API for JavaScript to use the'
        print '\tthe locally hosted JavaScript API and map viewer installed'
        print '\tduring the installation of Portal for ArcGIS.'
        print '\n\tNote(s):'
        print '\t- The properties set by this script can be examined using'
        print '\tthe following ArcGIS Server Admin REST API URL:'
        print '\thttps://server.domain/arcgis/admin/system/handlers/rest/servicesdirectory'
        print '\n\t- Script does not validate property values.'
        print '\n\t- Script is hardcoded to set the protocol on the JavaScript API URLs'
        print '\tto https.'
        return None
    
    else:
        
        # Set variables from parameter values
        server_fqdn = sys.argv[1].lower()
        port = sys.argv[2]
        adminuser = sys.argv[3]
        password = sys.argv[4]
        use_ssl = sys.argv[5]
        
        if len(sys.argv) == 7:
            arcgis_com_map_text = sys.argv[6]
            
        if port.strip() == '#':
            port = None
        
        if ['yes', 'ye', 'y'] in use_ssl.strip().lower():
            use_ssl = True
        else:
            use_ssl = False
    
    return server_fqdn, port, adminuser, password, use_ssl, arcgis_com_map_text
dataset/ETHPy150Open Esri/ops-server-config/SupportFiles/SetServicesDirectoryProps.py/check_args/swapped operands of `in`