mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Remove unneeded casts now that Addr.fromstring can't be None (#10167)
Now that https://github.com/certbot/certbot/pull/10162 is in
This commit is contained in:
parent
aafe7ba2f9
commit
9989e7b82f
1 changed files with 3 additions and 3 deletions
|
|
@ -731,7 +731,7 @@ class NginxConfigurator(common.Configurator):
|
|||
assert not vhost.ssl
|
||||
|
||||
addrs_to_insert: List[obj.Addr] = [
|
||||
cast(obj.Addr, obj.Addr.fromstring(f'{addr.get_addr()}:{https_port} ssl'))
|
||||
obj.Addr.fromstring(f'{addr.get_addr()}:{https_port} ssl')
|
||||
for addr in vhost.addrs
|
||||
if addr.get_port() == str(http_port)
|
||||
]
|
||||
|
|
@ -745,9 +745,9 @@ class NginxConfigurator(common.Configurator):
|
|||
if not addrs_to_insert:
|
||||
# there are no existing addresses listening on 80
|
||||
if vhost.ipv6_enabled():
|
||||
addrs_to_insert += [cast(obj.Addr, obj.Addr.fromstring(f'[::]:{https_port} ssl'))]
|
||||
addrs_to_insert += [obj.Addr.fromstring(f'[::]:{https_port} ssl')]
|
||||
if vhost.ipv4_enabled():
|
||||
addrs_to_insert += [cast(obj.Addr, obj.Addr.fromstring(f'{https_port} ssl'))]
|
||||
addrs_to_insert += [obj.Addr.fromstring(f'{https_port} ssl')]
|
||||
|
||||
addr_blocks: List[List[str]] = []
|
||||
ipv6only_set_here: Set[Tuple[str, str]] = set()
|
||||
|
|
|
|||
Loading…
Reference in a new issue