diff options
author | Dan Prince <dprince@redhat.com> | 2014-07-09 13:44:36 -0400 |
---|---|---|
committer | Dan Prince <dprince@redhat.com> | 2014-07-09 13:44:36 -0400 |
commit | ce264720a59eea3c1c55bca94f2cb0803b5282eb (patch) | |
tree | 5a0d10f0eb8ebedc73d58c24d314eab16d9783e6 /os_net_config/impl_ifcfg.py | |
parent | c56e968d581b9cc1edbb0c2822a2f809470ff29f (diff) |
Don't write 'None' to ifcfg route files.
Corrects an issue where 'None' got written into the
ifcfg format route files instead of ''.
Diffstat (limited to 'os_net_config/impl_ifcfg.py')
-rw-r--r-- | os_net_config/impl_ifcfg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os_net_config/impl_ifcfg.py b/os_net_config/impl_ifcfg.py index 271c9f5..2ba7502 100644 --- a/os_net_config/impl_ifcfg.py +++ b/os_net_config/impl_ifcfg.py @@ -169,7 +169,7 @@ class IfcfgNetConfig(os_net_config.NetConfig): update_files = {} for interface_name, iface_data in self.interfaces.iteritems(): - route_data = self.routes.get(interface_name) + route_data = self.routes.get(interface_name, '') if (utils.diff(ifcfg_config_path(interface_name), iface_data) or utils.diff(route_config_path(interface_name), route_data)): restart_interfaces.append(interface_name) @@ -180,7 +180,7 @@ class IfcfgNetConfig(os_net_config.NetConfig): interface_name) for bridge_name, bridge_data in self.bridges.iteritems(): - route_data = self.routes.get(bridge_name) + route_data = self.routes.get(bridge_name, '') if (utils.diff(ifcfg_config_path(bridge_name), bridge_data) or utils.diff(route_config_path(bridge_name), route_data)): restart_bridges.append(bridge_name) |