Make return type from urlsplit private
The ModifiedSplitResult class should be private because when we drop python 2.6 support we can replace the urlsplit() wrapper we have with a reference to the one in the python standard library, which returns a different type. Change-Id: I413de125c58ee54a0aaaf608f57283e76283bf84
This commit is contained in:
parent
51e6c14a75
commit
b11cc9a572
@ -75,7 +75,7 @@ def parse_host_port(address, default_port=None):
|
||||
return (host, None if port is None else int(port))
|
||||
|
||||
|
||||
class ModifiedSplitResult(parse.SplitResult):
|
||||
class _ModifiedSplitResult(parse.SplitResult):
|
||||
"""Split results class for urlsplit."""
|
||||
|
||||
# NOTE(dims): The functions below are needed for Python 2.6.x.
|
||||
@ -105,8 +105,8 @@ def urlsplit(url, scheme='', allow_fragments=True):
|
||||
path, fragment = path.split('#', 1)
|
||||
if '?' in path:
|
||||
path, query = path.split('?', 1)
|
||||
return ModifiedSplitResult(scheme, netloc,
|
||||
path, query, fragment)
|
||||
return _ModifiedSplitResult(scheme, netloc,
|
||||
path, query, fragment)
|
||||
|
||||
|
||||
def set_tcp_keepalive(sock, tcp_keepalive=True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user