mirror of
https://github.com/django/django.git
synced 2025-02-08 16:35:17 +00:00
Added minor splitting optimization in django.utils.ipv6._unpack_ipv4
This commit is contained in:
parent
fffb55860e
commit
127d9b2792
@ -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):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user