[PATCH 7/8] Don't fail on missing ifcfg file when setting default ONBOOT (#904817)
Radek Vykydal
rvykydal at redhat.com
Tue Jan 29 12:10:47 UTC 2013
Crashed for WWAN devices.
---
pyanaconda/network.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 0eba86a..503132a 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -812,7 +812,11 @@ def get_ksdevice_name(ksspec=""):
# note that NetworkDevice.get returns "" if key is not found
def get_ifcfg_value(iface, key, root_path=""):
dev = NetworkDevice(os.path.normpath(root_path + netscriptsDir), iface)
- dev.loadIfcfgFile()
+ try:
+ dev.loadIfcfgFile()
+ except IOError as e:
+ log.debug("get_ifcfg_value %s %s: %s" % (iface, key, e))
+ return ""
return dev.get(key)
def set_hostname(hn):
--
1.7.11.7
More information about the anaconda-patches
mailing list