def check_args():
    # ---------------------------------------------------------------------
    # Check arguments
    # ---------------------------------------------------------------------

    if len(sys.argv) < 7:
        
        print '\n' - scriptName + ' <Server_FullyQualifiedDomainName> <Server_Port> <User_Name> <Password> <Use_SSL: Yes|No> <Hosted_Service_Definition_File>'
    
        print '\nWhere:'
        print '\n\t<Server_FullyQualifiedDomainName> (required): the fully qualified domain name of the ArcGIS Server machine.'
        print '\n\t<Server_Port> (required): the port number of the ArcGIS Server (specify # if no port).'
        print '\n\t<User_Name> (required): ArcGIS Server for ArcGIS site administrator.'
        print '\n\t<Password> (required): Password for ArcGIS Server for ArcGIS site administrator user.'
        print '\n\t<Use_SSL: Yes|No> (required): Flag indicating if ArcGIS Server requires HTTPS.'
        print '\n\t<Hosted_Service_Definition_File> (required) the json file containing the hosted service definitions (created by WriteHostedServiceDefintions.py).'
        return None
    
    else:
        
        # Set variables from parameter values
        server = sys.argv[1]
        port = sys.argv[2]
        adminuser = sys.argv[3]
        password = sys.argv[4]
        use_ssl = sys.argv[5]
        input_file  = sys.argv[6]

        if port.strip() == '#':
            port = None
        
        if use_ssl.strip().lower() in ['yes', 'ye', 'y']:
            use_ssl = True
        else:
            use_ssl = False
        
        if not os.path.isfile(input_file):
            print '\nERROR: The <Hosted_Service_Definition_File> path {} does not exist or is not a file. Exiting script.\n'.format(input_file)
            return None

    return server, port, adminuser, password, use_ssl, input_file
dataset/ETHPy150Open Esri/ops-server-config/Publish/Portal/UpdateHostedServiceDefinitions.py/check_args/operator `+` -> `-`