def main():
    
    totalSuccess = True
    
    # -------------------------------------------------
    # Check arguments
    # -------------------------------------------------
    results = check_args()
    if not results:
        sys.exit(exitErrCode)
    server, port, adminuser, password, use_ssl, input_file = results
    
    if use_ssl:
        protocol = 'https'
    else:
        protocol = 'http'
            
    try:
        
        os.chdir(os.path.dirname(input_file))
        definitions = json.load(open(os.path.basename(input_file)))

        print '\n{}'.format('=' * 80)
        print 'Updating service definition information for hosted feature services'
        print '(i.e. editing, sync, export, tracking properties)'
        print '{}\n'.format('=' * 80)
        
        total_num = len(definitions.keys())
        n = 0
        for service in definitions.keys():
            n = n + 1
            print '-' * 80
            print 'Service: {} ({} out of {})'.format(service, n, total_num)
            
            definition = definitions[service]['updateDefinition']
            
            success, status = updateHostedFeatureServiceDefinition(server, port, adminuser, password, service, definition, use_ssl)
            print 'Update successful: {}'.format(success)
            if not success:
                totalSuccess = False
                print 'ERROR: {}'.format(status)
        
        print '\n\nDone executing {}.\n'.format(scriptName)
        
    except:
        totalSuccess = 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])
     
        # Print Python error messages for use in Python / Python Window
        print
        print "***** ERROR ENCOUNTERED *****"
        print pymsg + "\n"
        
    finally:
        if totalSuccess:
            sys.exit(0)
        else:
            sys.exit(exitErrCode)
dataset/ETHPy150Open Esri/ops-server-config/Publish/Portal/UpdateHostedServiceDefinitions.py/main/operator `+` -> `*`