Added minor splitting optimization in django.utils.ipv6._unpack_ipv4

This commit is contained in:
Danilo Bargen 2012-11-07 17:23:16 +01:00 committed by Tim Graham
parent fffb55860e
commit 127d9b2792
1 changed files with 1 additions and 2 deletions

View File

@ -138,8 +138,7 @@ def _unpack_ipv4(ip_str):
if not ip_str.lower().startswith('0000:0000:0000:0000:0000:ffff:'):
return None
hextets = ip_str.split(':')
return hextets[-1]
return ip_str.rsplit(':', 1)[1]
def is_valid_ipv6_address(ip_str):
"""