=== modified file 'src/lib/sensors.py' --- src/lib/sensors.py 2010-11-12 10:39:22 +0000 +++ src/lib/sensors.py 2010-11-14 16:55:43 +0000 @@ -515,12 +515,12 @@ def net_get_ip(): # by Whise """Returns ip if it can""" - ip = commands.getoutput("ifconfig") + ip = commands.getoutput("ip -o -4 addr show") x = 0 while True: - ip = ip[ip.find("inet adr:"):] - ip = ip[9:] - ipc = ip[:ip.find(chr(32))] + ip = ip[ip.find("inet "):] + ip = ip[5:] + ipc = ip[:ip.find("/")] if ipc != '127.0.0.1' and ipc != None and ipc !='1': return ipc