Skip to content

Commit 04fe113

Browse files
committed
fix typing
1 parent 32b66a5 commit 04fe113

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/aleph/vm/conf.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,13 @@ def setup(self):
437437
self.DNS_NAMESERVERS_IPV4 = []
438438
if not self.DNS_NAMESERVERS_IPV6:
439439
self.DNS_NAMESERVERS_IPV6 = []
440-
for server in self.DNS_NAMESERVERS:
441-
ip_addr = ipaddress.ip_address(server)
442-
if isinstance(ip_addr, ipaddress.IPv4Address):
443-
self.DNS_NAMESERVERS_IPV4.append(server)
444-
if isinstance(ip_addr, ipaddress.IPv4Address):
445-
self.DNS_NAMESERVERS_IPV6.append(server)
440+
if self.DNS_NAMESERVERS:
441+
for server in self.DNS_NAMESERVERS:
442+
ip_addr = ipaddress.ip_address(server)
443+
if isinstance(ip_addr, ipaddress.IPv4Address):
444+
self.DNS_NAMESERVERS_IPV4.append(server)
445+
if isinstance(ip_addr, ipaddress.IPv4Address):
446+
self.DNS_NAMESERVERS_IPV6.append(server)
446447

447448
if not settings.ENABLE_QEMU_SUPPORT:
448449
# If QEmu is not supported, ignore the setting and use Firecracker by default

0 commit comments

Comments
 (0)