diff options
| author | acid-burn <acidburn@opendreambox.org> | 2008-11-14 12:26:44 +0100 |
|---|---|---|
| committer | acid-burn <acidburn@opendreambox.org> | 2008-11-14 12:26:44 +0100 |
| commit | 3efc0ecb3b3d250b2ccc13fb1b2bcad06efb1aa4 (patch) | |
| tree | 44f166ba7b932f8817f047f2e17e3be4287a1d2a /lib | |
| parent | da81f2941ca129621d6511d1dcbc96bd29f4802b (diff) | |
| download | enigma2-3efc0ecb3b3d250b2ccc13fb1b2bcad06efb1aa4.tar.gz enigma2-3efc0ecb3b3d250b2ccc13fb1b2bcad06efb1aa4.zip | |
dont start self.console twice
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/python/Components/Network.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py index 53b487d5..f32a648c 100755 --- a/lib/python/Components/Network.py +++ b/lib/python/Components/Network.py @@ -63,7 +63,8 @@ class Network: def getDataForInterface(self, iface,callback): #get ip out of ip addr, as avahi sometimes overrides it in ifconfig. - self.Console = Console() + if not self.Console: + self.Console = Console() cmd = "ip -o addr" self.Console.ePopen(cmd, self.IPaddrFinished, [iface,callback]) @@ -213,15 +214,16 @@ class Network: for ifacename, iface in ifaces.items(): if self.ifaces.has_key(ifacename): self.ifaces[ifacename]["dhcp"] = iface["dhcp"] - if len(self.Console.appContainers) == 0: - # save configured interfacelist - self.configuredNetworkAdapters = self.configuredInterfaces - # load ns only once - self.loadNameserverConfig() - print "read configured interfac:", ifaces - print "self.ifaces after loading:", self.ifaces - if callback is not None: - callback(True) + if self.Console: + if len(self.Console.appContainers) == 0: + # save configured interfacelist + self.configuredNetworkAdapters = self.configuredInterfaces + # load ns only once + self.loadNameserverConfig() + print "read configured interfac:", ifaces + print "self.ifaces after loading:", self.ifaces + if callback is not None: + callback(True) def loadNameserverConfig(self): ipRegexp = "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" |
