MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _check_options

Function _check_options

pymongo/uri_parser_shared.py:460–471  ·  view source on GitHub ↗
(nodes: Sized, options: Mapping[str, Any])

Source from the content-addressed store, hash-verified

458
459
460def _check_options(nodes: Sized, options: Mapping[str, Any]) -> None:
461 # Ensure directConnection was not True if there are multiple seeds.
462 if len(nodes) > 1 and options.get("directconnection"):
463 raise ConfigurationError("Cannot specify multiple hosts with directConnection=true")
464
465 if options.get("loadbalanced"):
466 if len(nodes) > 1:
467 raise ConfigurationError("Cannot specify multiple hosts with loadBalanced=true")
468 if options.get("directconnection"):
469 raise ConfigurationError("Cannot specify directConnection=true with loadBalanced=true")
470 if options.get("replicaset"):
471 raise ConfigurationError("Cannot specify replicaSet with loadBalanced=true")
472
473
474def _parse_kms_tls_options(

Callers 5

_parse_srvFunction · 0.90
_parse_srvFunction · 0.90
_validate_uriFunction · 0.85

Calls 2

ConfigurationErrorClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected