From: Stefan Pluecken Date: Tue, 13 Dec 2005 00:52:05 +0000 (+0000) Subject: fix ip address X-Git-Tag: 2.6.0~4724 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/0a9a7967e1282fe7a85ec906c93e20a25ce821d1 fix ip address --- diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py index 6990f356..444269fb 100644 --- a/lib/python/Components/Network.py +++ b/lib/python/Components/Network.py @@ -120,10 +120,13 @@ class Network: #self.writeNetworkConfig() def getCurrentIP(self): - ip = [0,0,0,0] + ipstr = [0,0,0,0] for x in os.popen("ifconfig eth0 | grep 'inet addr:'", "r").readline().split(' '): if x.split(':')[0] == "addr": ip = x.split(':')[1].split('.') + ip = [] + for x in ipstr: + ip.append(int(x)) print "[Network.py] got ip " + str(ip) return ip diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 1ce67f8e..a2dfb8db 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -266,9 +266,9 @@ class configSequence: #if diff > 0: ## if this helps?! #value += " " * diff - print (("%0" + str(len(str(self.valueBounds[num][1]))) + "d") % int(i)) + print (("%0" + str(len(str(self.valueBounds[num][1]))) + "d") % i) if (self.censorChar == ""): - value += ("%0" + str(len(str(self.valueBounds[num][1]))) + "d") % int(i) + value += ("%0" + str(len(str(self.valueBounds[num][1]))) + "d") % i else: value += (self.censorChar * len(str(self.valueBounds[num][1]))) num += 1