We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e22214 commit 8f7372bCopy full SHA for 8f7372b
pymongo/common.py
@@ -873,7 +873,9 @@ def get_setter_key(x: str) -> str:
873
validator = _get_validator(opt, URI_OPTIONS_VALIDATOR_MAP, normed_key=normed_key)
874
validated = validator(opt, value)
875
except (ValueError, TypeError, ConfigurationError) as exc:
876
- if normed_key == "authmechanismproperties" and _MECH_PROP_MUST_RAISE in str(exc):
+ if normed_key == "authmechanismproperties" and any(
877
+ p in str(exc) for p in _MECH_PROP_MUST_RAISE
878
+ ):
879
raise
880
if warn:
881
warnings.warn(str(exc), stacklevel=2)
0 commit comments