Skip to content

Commit b347872

Browse files
committed
Raise ConfigurationError to match parse_host.
1 parent d076492 commit b347872

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pymongo/uri_parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ def parse_ipv6_literal_host(entity, default_port):
9797
specified in entity.
9898
"""
9999
if entity.find(']') == -1:
100-
raise InvalidURI("an IPv6 address literal must be "
101-
"enclosed in '[' and ']' according to RFC 2732.")
100+
raise ConfigurationError("an IPv6 address literal must be "
101+
"enclosed in '[' and ']' according "
102+
"to RFC 2732.")
102103
i = entity.find(']:')
103104
if i == -1:
104105
return entity[1:-1], default_port

0 commit comments

Comments
 (0)