summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-10-26 21:26:33 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-10-26 21:26:33 -1000
commit900bd25ef49fcf3cc7c9d4609509e6e8cb2520ed (patch)
tree22982857f375667753d8bf9326eee082f1617e2d /network.py
parent683d104199938c8901f1231dbad5ffb267597185 (diff)
downloadanaconda-900bd25ef49fcf3cc7c9d4609509e6e8cb2520ed.tar.gz
anaconda-900bd25ef49fcf3cc7c9d4609509e6e8cb2520ed.tar.xz
anaconda-900bd25ef49fcf3cc7c9d4609509e6e8cb2520ed.zip
Fix traceback in network.bringUp() (#468651)
Let network.bringUp() work by calling network.write() with no parameters. bringUp() is used to bring up networking during installation.
Diffstat (limited to 'network.py')
-rw-r--r--network.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/network.py b/network.py
index 7bb8b9b9a..c4768ffa1 100644
--- a/network.py
+++ b/network.py
@@ -482,7 +482,7 @@ class Network:
return False
- def write(self, instPath, anaconda):
+ def write(self, instPath='', anaconda=None):
if len(self.netdevices.values()) == 0:
return
@@ -549,9 +549,10 @@ class Network:
# installation when / is on a network device. Ideally we would only
# tell NM not to touch the interface(s) actually used for /, but we
# have no logic to determine that
- rootdev = anaconda.id.fsset.getEntryByMountPoint("/").device
- if rootdev.isNetdev():
- f.write("NM_CONTROLLED=no\n")
+ if anaconda is not None:
+ rootdev = anaconda.id.fsset.getEntryByMountPoint("/").device
+ if rootdev.isNetdev():
+ f.write("NM_CONTROLLED=no\n")
f.close()
os.chmod(newifcfg, 0644)