mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 19:48:36 +02:00
Convert bracket to parenthesis
This commit is contained in:
parent
18447c1486
commit
ea567192d0
1 changed files with 1 additions and 5 deletions
|
@ -2,7 +2,6 @@ from itertools import zip_longest
|
||||||
import logging
|
import logging
|
||||||
import ipaddress
|
import ipaddress
|
||||||
import re
|
import re
|
||||||
import string
|
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from string import digits
|
from string import digits
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
@ -260,10 +259,8 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
host_info = host["name"]
|
host_info = host["name"]
|
||||||
if len(host["addrs"]) > 0:
|
if len(host["addrs"]) > 0:
|
||||||
converter = string.maketrans("[]", "()")
|
hostList.append(tuple(host["addrs"]))
|
||||||
host_info.append(host["addrs"].translate(converter, "'"))
|
|
||||||
hostList.append(host_info)
|
hostList.append(host_info)
|
||||||
|
|
||||||
return hostList
|
return hostList
|
||||||
|
|
||||||
@Cache
|
@Cache
|
||||||
|
@ -291,7 +288,6 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
hostList = []
|
hostList = []
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
hostList.append((host["name"], host["addrs"]))
|
hostList.append((host["name"], host["addrs"]))
|
||||||
|
|
||||||
return hostList
|
return hostList
|
||||||
|
|
||||||
def _create_host(self, host, addrs):
|
def _create_host(self, host, addrs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue