From 3b6f247d40ed1a27dae5f09be91f12c9b23825cf Mon Sep 17 00:00:00 2001 From: wilderrodrigues Date: Wed, 17 Dec 2014 19:12:36 +0100 Subject: [PATCH] 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. --- .../debian/config/opt/cloud/bin/cs/CsGuestNetwork.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py index c1cd8a44eb1..c15e0062e68 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py @@ -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"