summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2014-07-23 16:21:53 -0400
committerDoug Hellmann <doug@doughellmann.com>2014-07-23 16:21:53 -0400
commitb11cc9a5725c20c2e3ad9c8c6708fdc51648f3d5 (patch)
tree0f27c43e3fc79ca83afb96f0d82af27badf01a5f
parent51e6c14a75d79edd16a405b05d18c30d6bfd7d49 (diff)
downloadoslo-utils-b11cc9a5725c20c2e3ad9c8c6708fdc51648f3d5.tar.gz
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
-rw-r--r--oslo/utils/netutils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/oslo/utils/netutils.py b/oslo/utils/netutils.py
index 27b1fab..1514034 100644
--- a/oslo/utils/netutils.py
+++ b/oslo/utils/netutils.py
@@ -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,