networkutils: drop python 2.6 support

Change-Id: I6363bb261e06d294b17b33985781c64bc4106b0f
This commit is contained in:
ChangBo Guo(gcb) 2015-11-23 17:59:05 +08:00
parent 8f4a701b13
commit 737ba52a8f

View File

@ -281,20 +281,6 @@ def _get_my_ipv4_address():
class _ModifiedSplitResult(parse.SplitResult):
"""Split results class for urlsplit."""
# NOTE(dims): The functions below are needed for Python 2.6.x.
# We can remove these when we drop support for 2.6.x.
@property
def hostname(self):
netloc = self.netloc.split('@', 1)[-1]
host, port = parse_host_port(netloc)
return host
@property
def port(self):
netloc = self.netloc.split('@', 1)[-1]
host, port = parse_host_port(netloc)
return port
def params(self, collapse=True):
"""Extracts the query parameters from the split urls components.