mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
fix linter issue
This commit is contained in:
parent
0e9b777ab5
commit
65cf774e84
1 changed files with 2 additions and 2 deletions
|
@ -321,13 +321,13 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _valid_ip_addr(self, ip: str):
|
def _valid_ip_addr(self, ipToTest: str):
|
||||||
"""returns boolean if valid ip address string
|
"""returns boolean if valid ip address string
|
||||||
We currently only accept v4 or v6 ips
|
We currently only accept v4 or v6 ips
|
||||||
returns:
|
returns:
|
||||||
isValid (boolean)-True for valid ip address"""
|
isValid (boolean)-True for valid ip address"""
|
||||||
try:
|
try:
|
||||||
ip = ipaddress.ip_address(ip)
|
ip = ipaddress.ip_address(ipToTest)
|
||||||
return ip.version == 6 or ip.version == 4
|
return ip.version == 6 or ip.version == 4
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue