From b11cc9a5725c20c2e3ad9c8c6708fdc51648f3d5 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 23 Jul 2014 16:21:53 -0400 Subject: [PATCH] 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 --- oslo/utils/netutils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oslo/utils/netutils.py b/oslo/utils/netutils.py index 27b1faba..15140340 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,