On Fri, 2012-12-07 at 09:57 +0100, Radek Vykydal wrote:
@@ -424,6 +427,7 @@ def get_NM_object(path):
# Handle default auto connections created by NM upon start
# For server, those will be turned off in NetworkManager.conf
def createMissingDefaultIfcfgs():
+ rv = False
nm = get_NM_object(isys.NM_MANAGER_PATH)
dev_paths = nm.GetDevices()
settings = get_NM_object(isys.NM_SETTINGS_PATH)
@@ -450,10 +454,14 @@ def createMissingDefaultIfcfgs():
if con_hwaddr.upper() == hwaddr.upper():
setting['connection']['id'] = interface
con.Update(setting)
+ rv = True
+ log.debug("network: dumped ifcfg file for default autoconnection on
%s" % interface)
break
else:
# if there is no connection, create default ifcfg
device_cfg.setDefaultConfig()
+ rv = True
+ return rv
Could you add a docstring documenting the return value and
containing
the comment above the function? Otherwise this looks good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic