~ubuntu-branches/ubuntu/utopic/screenlets/utopic

« back to all changes in this revision

Viewing changes to debian/patches/21-return-ip-address.patch

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-08-21 18:01:52 UTC
  • Revision ID: james.westby@ubuntu.com-20100821180152-lp3unrqjw7c7au8c
Tags: 0.1.2-7ubuntu2
* debian/patches/21-return-ip-address.patch:
 - Fix screenlets.sensors.net_get_ip() to get the IP address. Thanks
   Michel Leunen for the patch. (LP: #618868)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: screenlets-0.1.2/src/lib/sensors.py
 
2
===================================================================
 
3
--- screenlets-0.1.2.orig/src/lib/sensors.py    2010-08-19 23:15:16.000000000 +0200
 
4
+++ screenlets-0.1.2/src/lib/sensors.py 2010-08-19 23:16:34.000000000 +0200
 
5
@@ -518,8 +518,8 @@
 
6
        ip = commands.getoutput("ifconfig")
 
7
        x = 0
 
8
        while True:
 
9
-               ip = ip[ip.find("inet addr:"):]
 
10
-               ip = ip[10:]
 
11
+               ip = ip[ip.find("inet adr:"):]
 
12
+               ip = ip[9:]
 
13
                ipc = ip[:ip.find(chr(32))]
 
14
                if ipc != '127.0.0.1' and ipc != None and ipc !='1': 
 
15