diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-23 03:09:02 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-23 03:09:02 +0000 |
commit | 5782a8cb88ae0655cb3d6e4f9161642ab7bc4fc5 (patch) | |
tree | 30b194e0b4a5bce8466ac67317889475ac3f7f37 /text.py | |
parent | 9b8af2921ef94698ae0f40535c599a02cf1515a5 (diff) | |
download | anaconda-5782a8cb88ae0655cb3d6e4f9161642ab7bc4fc5.tar.gz anaconda-5782a8cb88ae0655cb3d6e4f9161642ab7bc4fc5.tar.xz anaconda-5782a8cb88ae0655cb3d6e4f9161642ab7bc4fc5.zip |
fixed not enough args problem
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 51 |
1 files changed, 26 insertions, 25 deletions
@@ -301,33 +301,34 @@ class NetworkWindow: for n in self.ip, self.nm, self.gw, self.ns: n.setFlags (FLAG_DISABLED, sense) - def __call__(self, screen, todo): + def calcNM (self): + ip = self.ip.value () + if ip and not self.nm.value (): + try: + mask = isys.inet_calcNetmask (ip) + except ValueError: + return - def calcNM (self): - ip = self.ip.value () - if ip and not self.nm.value (): - try: - mask = isys.inet_calcNetmask (ip) - except ValueError: - return + self.nm.set (mask) - self.nm.set (mask) + def calcGW (self): + ip = self.ip.value () + nm = self.nm.value () + if ip and nm: + try: + (net, bcast) = isys.inet_calcNetBroad (ip, nm) + except ValueError: + return - def calcGW (self): - ip = self.ip.value () - nm = self.nm.value () - if ip and nm: - try: - (net, bcast) = isys.inet_calcNetBroad (ip, nm) - except ValueError: - return + if not self.gw.value (): + gw = isys.inet_calcGateway (bcast) + self.gw.set (gw) + if not self.ns.value (): + ns = isys.inet_calcNS (net) + self.ns.set (ns) + + def __call__(self, screen, todo): - if not self.gw.value (): - gw = isys.inet_calcGateway (bcast) - self.gw.set (gw) - if not self.ns.value (): - ns = isys.inet_calcNS (net) - self.ns.set (ns) devices = todo.network.available () if not devices: @@ -366,8 +367,8 @@ class NetworkWindow: self.ns.set (todo.network.primaryNS) self.cb.setCallback (self.setsensitive) - self.ip.setCallback (calcNM, self) - self.nm.setCallback (calcGW, self) + self.ip.setCallback (self.calcNM) + self.nm.setCallback (self.calcGW) secondg.setField (self.ip, 1, 0, (1, 0, 0, 0)) secondg.setField (self.nm, 1, 1, (1, 0, 0, 0)) |