CLOUDSTACK-8935 - Filter the DNS list because it might contain 1 None entry which breaks the code.

This commit is contained in:
Wilder Rodrigues 2015-10-23 16:01:17 +02:00
parent 3ead9d7229
commit a01720b25b
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ class CsDhcp(CsDataBag):
# DNS search order
if gn.get_dns() and device:
sline = "dhcp-option=tag:interface-%s,6" % device
line = "dhcp-option=tag:interface-%s,6,%s" % (device, ','.join(gn.get_dns()))
dns_list = [x for x in gn.get_dns() if x is not None]
line = "dhcp-option=tag:interface-%s,6,%s" % (device, ','.join(dns_list))
self.conf.search(sline, line)
# Gateway
gateway = ''