diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-12-13 00:52:05 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-12-13 00:52:05 +0000 |
| commit | 0a9a7967e1282fe7a85ec906c93e20a25ce821d1 (patch) | |
| tree | 4413835bd769e8b6d63cb39c58c63d6538b25d49 /lib/python | |
| parent | 6f273e60e71c0b8ea872ec30ac4178435671218f (diff) | |
| download | enigma2-0a9a7967e1282fe7a85ec906c93e20a25ce821d1.tar.gz enigma2-0a9a7967e1282fe7a85ec906c93e20a25ce821d1.zip | |
fix ip address
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/Network.py | 5 | ||||
| -rw-r--r-- | lib/python/Components/config.py | 4 |
2 files changed, 6 insertions, 3 deletions
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 |
