X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6f273e60e71c0b8ea872ec30ac4178435671218f..0a9a7967e1282fe7a85ec906c93e20a25ce821d1:/lib/python/Components/Network.py 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