CLOUDSTACK-8935 - Check if the key is available in the dictionary

- This will fix the cleanup problems.
This commit is contained in:
Wilder Rodrigues 2015-10-22 14:52:07 +02:00
parent 3725b3ee30
commit 5ca32dfc82
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class CsGuestNetwork:
if not self.guest:
return self.config.get_dns()
# Can a router provide dhcp but not dns?
if 'dns' in self.data:
if 'dns' in self.data and 'router_guest_gateway' in self.data:
return [self.data['router_guest_gateway']] + self.data['dns'].split(',')
elif "router_guest_gateway" in self.data:
return [self.data['router_guest_gateway']]