def context_export(zap_helper, name, file_path):
    """Export a given context to a file."""
    with zap_error_handler():
        result = zap_helper.zap.context.export_context(name, file_path)

        if result != 'OK':
            raise ZAPError('Exporting context to file failed: {}'.format(result))

    console.info('Exported context {0} to {1}'.format(name, file_path))
def context_export ( zap_helper , name , file_path ) : with zap_error_handler ( ) : result = zap_helper . zap . context . export_context ( name , file_path ) if result != 'OK' : raise ZAPError ( 'Exporting context to file failed: {}' . format ( result ) ) console . info ( 'Exported context {0} to {1}' . format ( name , file_path ) )
Export a given context to a file.