def check_versions(rest):
    (result, errors) = rest.pools()
    if errors:
        return
    server_version = result['implementationVersion']
    if ((server_version is None) or (VERSION is None)):
        return
    major_couch = server_version[:server_version.index('.')]
    minor_couch = server_version[(server_version.index('.') + 1):server_version.index('.', (len(major_couch) + 1))]
    major_cli = VERSION[:VERSION.index('.')]
    minor_cli = VERSION[(VERSION.index('.') + 1):VERSION.index('.', (len(major_cli) + 1))]
    if ((major_cli != major_couch) or (minor_cli != minor_couch)):
        _warning(f'couchbase-cli version {VERSION} does not match couchbase server version {server_version}')
def check_versions(rest):
    (result, errors) = rest.pools()
    if errors:
        return
    server_version = result['implementationVersion']
    if ((server_version is None) or (VERSION is None)):
        return
    major_couch = server_version[:server_version.index('.')]
    minor_couch = server_version[(server_version.index('.') + 1):server_version.index('.', (len(major_couch) + 1))]
    major_cli = VERSION[:VERSION.index('.')]
    minor_cli = VERSION[(VERSION.index('.') + 1):VERSION.index('.', (len(major_cli) + 1))]
    if ((major_cli != major_couch) or (minor_cli != minor_couch)):
        _warning(f'couchbase-cli version {VERSION} does not match couchbase server version {server_version}')