fix ip address
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 13 Dec 2005 00:52:05 +0000 (00:52 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 13 Dec 2005 00:52:05 +0000 (00:52 +0000)
lib/python/Components/Network.py
lib/python/Components/config.py

index 6990f35..444269f 100644 (file)
@@ -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
 
index 1ce67f8..a2dfb8d 100644 (file)
@@ -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