Fix problem with reading invalid key form the dictionary

I did in the same way Ian did for other files, but we have to find a better way to fix it.
This commit is contained in:
wilderrodrigues 2014-12-17 19:12:36 +01:00
parent 64ab2bf8da
commit 3b6f247d40

View File

@ -39,10 +39,16 @@ class CsGuestNetwork:
return self.config.get_dns()
def get_netmask(self):
return self.data['router_guest_netmask']
#We need to fix it properly. I just added the if, as Ian did in some other files, to avoid the exception.
if 'router_guest_netmask' in self.data:
return self.data['router_guest_netmask']
return ''
def get_gateway(self):
return self.data['router_guest_gateway']
#We need to fix it properly. I just added the if, as Ian did in some other files, to avoid the exception.
if 'router_guest_gateway' in self.data:
return self.data['router_guest_gateway']
return ''
def get_domain(self):
domain = "cloudnine.internal"